GraphQL Node
Execute GraphQL queries and mutations against any GraphQL API
Written By pvdyck
Last updated About 3 hours ago
GraphQL Node
The GraphQL node sends queries and mutations to any GraphQL endpoint, providing a structured alternative to REST API calls via the HTTP Request node.
Parameters
Headers
Add custom HTTP headers as key-value pairs. Useful for passing API keys, content types, or other required headers.
Example Query
query GetUser($id: ID!) { user(id: $id) { name email createdAt }}With variables: {"id": "123"}
Example Mutation
mutation CreatePost($input: PostInput!) { createPost(input: $input) { id title }}With variables: {"input": {"title": "Hello", "body": "World"}}
Tips
- Use Variables for parameterized queries instead of string interpolation -- cleaner and safer
- Set
Content-Type: application/jsonin headers if the endpoint requires it (most do by default) - Use expressions in the Variables field to pass dynamic data:
{{ JSON.stringify({ id: $json.userId }) }} - For authenticated endpoints, configure credentials in Secure Vault and set the Authentication parameter
Limitations
- Subscriptions not supported -- Real-time WebSocket-based GraphQL subscriptions cannot be used
- File uploads not supported -- GraphQL multipart uploads are not available
- Same timeout as HTTP Request -- Subject to the 10-second timeout limit on indie.money
- For simple REST calls, the HTTP Request Node may be simpler