Skip to main content
Version: 3.0 (next)

GraphQL Nodes

Query and change data in any GraphQL API from a pipeline, with variables from upstream nodes.

Needs
A GraphQL connection
Operations
graphql.query · graphql.mutation
Output
result.data · result.errors · result.extensions

Each GraphQL operation is its own node, under APIs in the node palette. A node runs a saved function of its operation on a GraphQL connection.

Configuration Quick Reference​

FieldWhat you chooseDetails
ParametersConnection, Function, Function Parameters, Timeout OverrideSelect the connection, the function, fill the ((parameters)) of its variables from upstream data, and optionally override the timeout.
SettingsDescription, Timeout, Retry on Timeout, Retry on Fail, On ErrorNode description, maximum execution time, retry behaviour and error handling. All default to the pipeline's values.
GraphQL Query nodeGraphQL Query node

GraphQL Query Node

GraphQL Query Node​

Runs the function's query with its variables. A server can answer part of a query and fail the rest: when any root field carries data the node succeeds and lists what failed in result.errors; when none does, the node fails with the server's messages.

Output

{
"result": {
"data": { "line": { "id": "L3", "name": "Line 3", "oee": null } },
"errors": [
{ "message": "OEE service unavailable", "path": ["line", "oee"], "locations": [{ "line": 1, "column": 31 }] }
],
"extensions": {}
}
}
ExpressionDescription
$node["Name"].result.dataThe response's data: one key per root field you selected, shaped like your query, e.g. $node["Name"].result.data.workOrder.status. A field the server could not resolve is null and named in errors
$node["Name"].result.errorsThe errors the server reported beside the data, each with message and, where the server gives them, path, locations and extensions (extensions.code). Empty when the whole operation succeeded
$node["Name"].result.extensionsThe response's extensions object, such as a query cost or tracing; empty when the server sent none

GraphQL Mutation Node​

Runs the function's mutation with its variables. A mutation is not idempotent: the connector never resends one by itself, and one whose answer was lost (a timeout, a dropped link) may already have run on the server. With store-and-forward on, such a mutation is sent again when the link returns.

Output: the same keys as the Query node: result.data (what the mutation returned), result.errors and result.extensions.

Metadata​

Every node also carries _metadata: the shared execution facts (success, functionId, durationMs, timestamp) and the call's own: _metadata.method (the operation), _metadata.connectionId, _metadata.protocol (graphql), _metadata.statusCode (the HTTP status), _metadata.operationName when the function names one, and _metadata.warning when data came back with errors.

Failures​

A node fails, with the server's messages, when the answer carries errors and none of what was asked. That is a refusal the same request would meet again, so Retry on Fail does not help, unless an error says to try again (a rate limit, an unavailable back end, an internal server error), which is temporary. HTTP 400, 401, 403 and 404 are refusals; 408, 429, 5xx and network failures are temporary. A document of the wrong kind (a mutation in a Query function), a missing operation name or variables that are not a JSON object fail the node before anything is sent.