shopify-api-js
shopify-api-js copied to clipboard
ApolloClient 'Access denied for giftCards field'
Issue summary
Shopify-cli create app scope has 'read_gift_cards'/'write_gift_cards'. Node Api Context set to ApiVersion.April21 (21-04).
const gqlClient = new Shopify.Clients.Graphql('sonity-ltd.myshopify.com', TEST_ACCESS_TOKEN); const data = await gqlClient.query({ data: { "query": query getGiftCards { giftCards(first: 10) { edges { node { id } } } } }, }); const gc = data.body; console.log("gql client data ", gc)
Expected behavior
GraphQL query/mutation access as per https://shopify.dev/api/examples/gift-cards
Actual behavior
Access denied for giftCards field.
Steps to reproduce the problem
- shopify-cli create private node app, serve to test store.
- Run afforementioned query using @shopify-api/client.
Leaving this answer behind for anyone who is attempting to interface with gift_cards
You need to have a Plus Account, and ask Shopify Support to enable it as well.
This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days.
We are closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.
If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines
Thank you!