GraphQL Node + Shopify Credentials

Describe the problem/error/question

At the moment I can’t use the GraphQL node to connect to Shopify as I keep getting an error about a refreshToken being required. When I use a HTTPRequest node I can select a “predefined credential” and then choose my Shopify one. I can then execute a GraphQL query without getting this error.

Is it possible to have the predefined credentials option available in GraphQL as the interface for entering the actual query and variables is much easier to use.

What is the error message (if any)?

AssertionError [ERR_ASSERTION]: refreshToken is required at ClientOAuth2Token.refresh

Please share your workflow


Share the output returned by the last node

Information on your n8n setup

  • n8n version: n8n Cloud
  • Running n8n via n8n cloud

Hi @joe73k !

There isn’t a single piece of documentation that explicitly states that the GraphQL node does not support predefined OAuth2 credentials, but this behavior is implied in the docs.

Predefined OAuth2 credentials (like Shopify) are documented and supported in the HTTP Request node, which handles access and refresh tokens automatically. The GraphQL node documentation does not mention this capability, as it expects authentication to be handled manually within the node itself (for example via headers or a manually configured OAuth flow).

That’s why the same Shopify credentials work in the HTTP Request node but fail in the GraphQL node with a refreshToken is required error. Supporting predefined credentials in the GraphQL node would require a feature enhancement rather than a configuration change.

https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httpRequest/