GraphQL Trigger

The GraphQL Trigger lets the Flogo app act as the GraphQL server. To use this trigger, you simply upload your GraphQL schema and TIBCO Cloud Integration - Flogo (PAYG) automatically creates the flows corresponding to each query or mutation field in your schema.

Trigger Settings

Field Description
Trigger Settings
Port The port on which the trigger listens to requests. By default, it is set to 7879. You can change this to use any other port that is open. This field can also be set using an application property.
Important: If the app has multiple triggers that require a port to be specified, make sure that the port number is unique for for each trigger. Two triggers in the same app cannot run on the same port.
Path The HTTP resource path for the operation. By default, it is set to /graphql, but you can change it to any string that is meaningful to you. It is the single endpoint that GraphQL queries and mutations use to access data from the multiple resources on the server. This field can also be set using an application property.
GraphQL Schema File The file that contains the GraphQL schema used to create the flow. The file has a .gql or .graphql extension.
Note: If you have made changes to the GraphQL schema file that you uploaded when creating the flow or trigger, you must propagate the changes to the flow input and flow output. To do this, after you select the updated schema file in this field, click the Sync button on the top right corner.
Secure Connection By default, it is set to False. If you set this field to True, you can create a secure endpoint by providing Server Key and CA or Server Certificate.

Server Key - A PEM encoded private key file

CA or Server Certificate - A PEM encoded CA or self-signed server certificate file

Handler Settings
GraphQL Operation The type of Graphql operation the flow should represent. You can select either Query or Mutation
Resolver for This field is populated based on the type of GraphQL Operation that you selected. If you selected Query, the Resolver For lists the field names under the query type in the schema. If you select Mutation, the drop down menu lists the field names under the mutation type in the schema.

Map to Flow Inputs

This tab allows you to map the trigger output to flow input. The tab contains an element, arguments, which contains a list of fields or objects that match the input arguments of the Resolver For field in the GraphQL schema.

Map from Flow Outputs

Map the flow output to the trigger reply in this tab. The tab contains a child element, data, which contains either a simple type or an object that match the output type of the Resolver For field in the GraphQL schema. If the output type of the field is an interface type, the data will contain a single field of type any.