← View all announcements
Improvement

GraphQL action extended with API endpoint support

Have you ever wanted to call the actions.shopify.graphql action with an API version other than the lowest-supported one?

We've added an extra endpoint parameter to solve this issue!

You can call the action just like before, passing only the query parameter:

const shopResult = await actions.shopify.graphql(
  'query { shop { name } }'
)

You can also call the action with an extra, endpoint parameter where you can specify the API version as well:

const shopResult = await actions.shopify.graphql(
  '/admin/api/2023-01/graphql.json',
  'query { shop { name } }'
)