GraphQL
Naming Convention
All GraphQL universal modules should have the following module label and description:
Module label: Execute a GraphQL query
Module description: Performs an arbitrary authorized API call.


{
"url": "https://www.example.com/graphql",
"method": "{{parameters.method}}",
"qs": {
"query": "{{parameters.queryQs}}"
},
"headers": {
"Content-Type": "application/json"
},
"body": {
"query": "{{parameters.queryBody}}",
"operationName": "{{parameters.operationName}}",
"variables": "{{if(isArray(parameters.variables), toCollection(parameters.variables, 'key', 'value'), parameters.variables)}}"
},
"type": "json",
"response": {
"output": {
"headers": "{{headers}}",
"body": "{{body}}",
"statusCode": "{{statusCode}}"
}
}
}

[
{
"name": "method",
"type": "select",
"label": "Method",
"required": true,
"default": "POST",
"options": [
{
"label": "GET (introspection query)",
"value": "GET",
"nested": [
{
"name": "queryQs",
"label": "Query",
"type": "text",
"required": true
}
]
},
{
"label": "POST (queries and mutations)",
"value": "POST",
"nested": [
{
"name": "queryBody",
"label": "Query",
"type": "text",
"required": true
},
{
"name": "operationName",
"label": "Operation name",
"type": "text",
"advanced": true
},
{
"name": "variablesDataSource",
"label": "Variables data source",
"type": "select",
"required": true,
"advanced": true,
"default": "array",
"options": [
{
"value": "array",
"label": "Form",
"nested": [
{
"name": "variables",
"label": "Variables",
"type": "array",
"mappable": {
"help": "Key-Value pairs as an Array of Collections e.g. `[{key:id,value:123},{key:name,value:'John'},…]`"
},
"spec": [
{
"name": "key",
"label": "Key",
"type": "text"
},
{
"name": "value",
"label": "Value",
"type": "text"
}
]
}
]
},
{
"value": "object",
"label": "Collection",
"nested": [
{
"name": "variables",
"label": "Variables",
"help": "A single Collection e.g. `{id:123,name:'John', …}`",
"type": "any"
}
]
}
]
}
]
}
]
}
]
[
{
"name": "body",
"type": "any",
"label": "Body"
},
{
"name": "headers",
"type": "collection",
"label": "Headers"
},
{
"name": "statusCode",
"type": "number",
"label": "Status code"
}
]
{}
Last updated