GraphQL
graphql · Nodes · Utility
Sends a GraphQL request and returns the response.
GraphQL#
Sends a GraphQL query or mutation and returns the response data and errors separately.
When to Use#
- Call a GraphQL API as a step the graph should show.
- Use an existing workspace connection for provider authentication.
- Run advanced Linear queries or mutations absent from the first-class Linear node.
Prefer a first-class provider node when it already exposes the required operation: it provides typed fields and provider-specific validation. Never place credentials in query text or variables; authenticate with a connection.
When queries are part of larger work, such as a loop over pages or several queries whose results are combined, make them in a JavaScript node with verdalia.api.graphql.query, which also sends mutations. It sends through the same code, connection authentication, and public-address rules as this node.
Configuration#
connection: optional workspace connection used for authentication. Use the returned connection ID, not its display name.endpoint: required GraphQL endpoint URL. Supports{{ input.* }}interpolation. It must reach a public address, under the same rules as HTTP Request:localhostand private, loopback, or link-local addresses are refused, and redirects (up to 10) are checked hop by hop.query: required GraphQL query or mutation. Supports interpolation.variables: optional JSON object. Supports interpolation. Thevariablesinput socket takes precedence when connected.timeout_secs: request timeout from 1 to 300 seconds. Default: 30.retry: sends the request again after a failure that passes, with the settings and rules in HTTP Request's Retries. Default:off. GraphQL is sent asPOST, so a query and a mutation are both treated as writes: sent again only after a connection or DNS failure, or a425or429response.
Inputs#
input: data used for interpolation.variables: optional JSON variables object. When connected, it overrides configured variables.
Outputs#
data: the GraphQL responsedatavalue, ornullwhen absent.errors: the GraphQL responseerrorsvalue, ornullwhen absent.
Advanced Linear example#
Select a Linear connection and use https://api.linear.app/graphql as the endpoint:
{
"connection": "<linear_connection_id>",
"endpoint": {
"content": "https://api.linear.app/graphql",
"mode": "raw"
},
"query": {
"content": "query CurrentViewer { viewer { id name email } }",
"mode": "raw"
},
"variables": {
"content": "{}",
"mode": "raw"
}
}
Use the first-class Linear node for its supported issue, project, team, user, and comment operations. Use GraphQL, as this node or as verdalia.api.graphql.query, when the required Linear API capability is absent there.
Inputs
inputRequiredvariablesOptional
Outputs
dataerrors
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
connection | connection | No | Optional connection for authentication |
endpoint | text_block | No | GraphQL endpoint URL. Must reach a public address. Supports {{ input.field }} interpolation. |
query | text_block | No | GraphQL query or mutation. Supports {{ input.field }} interpolation. |
variables | text_block | No | Query variables as JSON object. Supports {{ input.field }} interpolation. |
timeout_secs | integer | No | |
retry | tagged_union | No | Sends a request again after a failure that passes: a rate limit, a busy server, a dropped connection. Off sends once. |
base_config | record | No | Shared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow). |