Consume GraphQL Service



This plugin consumes a GraphQL Web Service and optionally captures the response as a list, record, or value. The 'graphql-request' package must be installed to use this action.

Endpoint URL

Specify a GraphQL endpoint.

GraphQL query

Type in a GraphQL query. For example:



{ product { name category price } }



GraphQL variables

Specify GraphQL variables, in the form of JavaScript object, to provide to the query. For example:

{ customerNumber : 1234 }

Headers

Provide HTTP headers in the form of a JavaScript object. Headers can be used for authentication.

Capture response?

Check this box to capture the Web Service response into a variable or property.

Capture as

Variables and properties are tracked as either lists, records, or simple values. Specify the proper context for the results of this query.

Capture Specific Property

You can capture the entire Web Service response, or just a specific property. If you would like to capture a specific property, provide it here.

For example:

customerRecord


or


customerRecord.orders

Where do you want to place the response?

The response can be placed on the screen, into a grid, into a work variable, or into a property.

Enter work variable name

A work variable is accessible by other steps within the same routine. Some work variables, like 'activeGridRecord' are implied and don't have to be explicitely defined by you.

Enter API output property name

The API output object represents the data sent in response to the API request.