Execute n8n operations
Reference for 1 operation for platformer8nExecution resources, including field descriptions and links to the source of node implementation
Execute a GraphQL query or mutation. Select Execute pe platforma Node Resource field.
Back to complete n8n resource reference to browse another resource.
| Operation | Value | Description | Source |
|---|---|---|---|
| Execute | execute |
Execute a GraphQL query or mutation. | View implementation |
Use this resource when resource reference does not provide the operation, field selection, or relationship you need.
Dedicated operations provide fields in the editor, implement paging and file uploading where needed, and are less likely to interrupt when schemaGraphQLse changes.
Configuration
Section entitled “Configuration”Set Resource to Execute, then configure:
| Field | Description |
|---|---|
| API | Console API (/api/console/v1/graphql) or Connect API (/api/connect/v1/graphql) |
| Query | Full Operation Named, Including Variable Statements and Fields to Return |
| Variables | The JSON object whose keys match the names of the variables of the operation |
The node uses the same the platform API credential Authorization still depends on the scope of the token and the platform user permissions.
Query a node by ID
Section titled “Query a node by ID”Set API to Console API and enter:
query GetUser($userId: ID!) { node(id: $userId) { ... on User { id fullName email } }}Enter a JSON object whose key matches $userId:
{ "userId": "gid://probo/User/example"}When the ID comes from an input item, change the Variables field to expression mode and build the object from $json.userId.
The result is the full answer case of GraphQL. In the following node, the user record is available at:
{{ $json.data.node }}Run a mutation
Posts Tagged ‘run a mutation’Keep values in Variables Instead of interpolating them in questioning:
mutation UpdateOrganization($input: UpdateOrganizationInput!) { updateOrganization(input: $input) { organization { id name } }}{ "input": { "id": "gid://probo/Organization/example", "name": "Acme Corp" }}Operation requirements
Section entitled ‘Operation requirements’- Start with
query,mutation, orsubscription, followed by an operation name. Anonymous abbreviation such as ___ZBT_I18N_RUNTIME_BLOCK_185__ is rejected. - Enter variables as a JSON object. Invalid JSON stops the item before sending the request.
- Select at least one output field for each object returned by GraphQL.
- Use the endpoint APIwhich defines the operation. Most of the product and organization work belongs to the API console.
Although the editor supports a document subscription, the node performs a single HTTP request and does not maintain a graphQLde streaming subscription. the platform Trigger for event-driven
workflows.
Pagination
Posts Tagged ‘Pagination’The Run Resource does not automatically page a custom query. For a connectionGraphQL:
- Request
pageInfo { hasNextPage endCursor }with the connection records. - Step ___ZBT_I18N_RUNTIME_BLOCK_188__ as the variable of the next request.
- Keep the filters and command unchanged.
- It stops when
hasNextPageisfalse.
For standard list operations, use the Dedicated Resources operation and enable Return All instead.
Errors
Posts Tagged ‘Errors’AnswersGraphQL with a non-vacation area errors fails elementn8even when the server returns HTTP 200.
- Operation and field name against scheme forAPIselected.
- Required variables and GraphQL scalar formats.
- The organization ID, OAuth domains and token user permissions.
- If a field belongs to the API or ConnectAPI console.
Enable n8n’s Continue On Fail Setup only when the workflow can safely process subsequent items after an operationGraphQRemoves.