shopify-api-js icon indicating copy to clipboard operation
shopify-api-js copied to clipboard

ApolloClient 'Access denied for giftCards field'

Open nacmonad opened this issue 3 years ago • 1 comments

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

  1. shopify-cli create private node app, serve to test store.
  2. Run afforementioned query using @shopify-api/client.

nacmonad avatar Dec 14 '21 00:12 nacmonad

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.

developerwok avatar Feb 27 '22 08:02 developerwok

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.

github-actions[bot] avatar Oct 06 '22 02:10 github-actions[bot]

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!

github-actions[bot] avatar Oct 20 '22 02:10 github-actions[bot]