In this article
...
Field Name | Field Type | Field Dependency | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
Label*
Default Value: GraphQL Client | String | None. | Specify a unique name, especially if you have more than one of the same Snap in your pipeline.
| ||||||
GraphQL endpoint* Default Value: None. | String | None. | Specify the server URL that the Snap uses to connect to the GraphQL endpoint. | ||||||
Query builder | Button | None. | If you need help to form the query, click on this button to open the query builder. If the account is valid, the fields available from the server schema appear on the left side of the query builder. You can choose any fields to query on by clicking the dropdown lists and checkboxes. The formed query appears on the right. Click Ok to close the UI component and the query appears in under Query in the Snap Settings. | ||||||
Query Default Value: None. | String/Expression | None. | Specify the query in the text box. You can also click the expression icon to build your query dynamically, which can evaluate both pipeline and upstream parameters. If you need help building the query, click the Query Builder button to open the query builder.
| ||||||
GraphQL variables | Use this field set to add query parameters to be included in the request. This is optional and can either be defined directly in the URL, as separate parameters, or both. | ||||||||
Variable name
Default value: None. | String/Expression/Suggestion | None. | Specify the name of the query variable. String values must be enclosed in double quotes (
| ||||||
Variable value
Default value: None. | String/Expression | None. | Specify the value to assign to the variable. | ||||||
Client settings | Additional settings for the GraphQL Client. | ||||||||
Trust all certificates Default Value: Not selected | Checkbox | None. | Select this checkbox to trust all certificates, such as self-signed certificates. | ||||||
Follow redirects Default Value: Selected | Checkbox | None. | Select this checkbox to accept the response and redirect the request. | ||||||
Maximum number of redirects
Default Value: 10 | Integer/Expression | None. | Specify the maximum number of redirects to allow. | ||||||
Read timeout (seconds)
Default Value: 900 | Integer | None. | Specify the number of seconds that the Snap must wait before terminating the request because of a failure to read from the target service. | ||||||
Connection timeout (seconds)
Default Value: 30 | Integer | None. | Specify the number of seconds that the Snap must wait before terminating the request because of a failure to establish a connection to the target endpoint or service. | ||||||
Enable pagination Default Value: Not selected | Checkbox | None. | Select this checkbox to return multiple pages of results through repeated requests with the GraphQL query.
| ||||||
Pagination properties | Use this field set to define pagination settings related to query executions that make multiple requests for pages of data.
| ||||||||
Max page count
Default Value: 3 | Integer | Appears when you select the Enable pagination checkbox | Specify the maximum number of pages of data to retrieve, if enough data is available. This value is the number of times a request is made with the specified query. The Snap stops fetching the next page when the maximum number of pages is reached.
| ||||||
Pagination interval (seconds) Default Value: 0 | Integer | Appears when you select the Enable pagination checkbox. | Specify the time interval between each page request in seconds. | ||||||
Pagination type*
Default Value: Cursor | Dropdown list | Appears when you select the Enable pagination checkbox | Select the type of pagination to use for the GraphQL query. Currently, this Snap supports only cursor-type pagination. | ||||||
Has additional page path*
Default Value: N/A | String/Expression | Appears when you select the Enable pagination checkbox | Specify the path to the field in the GraphQL schema that indicates whether an additional page of data is available. You can define only one Has additional page path and one Next cursor path for the query. | ||||||
Next cursor path*
Default Value: None | String/Expression | Appears when you select the Enable pagination checkbox | Specify the path to the field in the GraphQL schema that contains the cursor value for subsequent page requests. The path should start at the root field, not at the user-defined top-level query. This path represents the location in the specified query’s payload that contains the value to be used as the cursor in the next page request. You can define only one Has additional page path and one Next cursor path for the query. | ||||||
Cursor variable name*
Default Value: None | String/Expression/Suggestion | Appears when you select the Enable pagination checkbox | Specify the name of the GraphQL variable that holds the cursor used for pagination. This variable is passed as the cursor value within the query. The cursor variable name is validated against the variable names parsed from the query defined in the Query field. If it does not match one of these parsed variable names, the Snap fails with an error. Ensure that the variable name entered in this field matches the name of the variable mapped to the cursor parameter of the root field. Using an incorrect variable name here may cause the cursor data for the next request to be sent to the wrong root field parameter. This misalignment could lead to multiple requests returning identical data (if Max page count is provided) or an infinite loop of requests (if Max page count is left blank).
| ||||||
Include extensions Default Value: Deselected | Checkbox/Expression | None | Select this checkbox to include
The output document structure contains two fields,
When you deselect this checkbox, the output document uses the original document structure (to maintain backward compatibility) and contains only the content of the
| ||||||
Snap Execution Default Value: Execute only | Dropdown list | N/A | Select one of the following three modes in which the Snap executes:
|
...