Using GraphQL Schema

GraphQL provides a powerful query language for your APIs enabling clients to get the exact data that they need. It can get data from multiple resources in a single request by aggregating the requested data to form one result set. GraphQL provides a single endpoint for accessing data in terms of types and fields.

The GraphQL trigger turns your app into a GraphQL server implementation. Each flow in the app acts like a GraphQL field resolver. So, the output of the flow must match the return type of the field in the schema.

You can create a flow, choose the GraphQL trigger, and drop it to the trigger panel. You must then select the type of GraphQL operation (query or mutation) and resolver. Save and sync your trigger input and output.

Note: This section assumes that you are familiar with GraphQL. To learn about GraphQL, refer to the GraphQL documentation.

GraphQL server implementation

To obtain samples of GraphQL schemas and app JSON files, go to https://github.com/project-flogo/graphql.

The GraphQL schema must have either .gql or .graphql extension.

For more information, see GraphQL Trigger.