We use the GraphiQL app on several client stores to manage things like custom discounts, or run meta definition migrations.
However, there are consistently issues with permissions - often when the app is installed with a limited set of permissions (eg. write discounts), after you install it, the query screen flashes momentarily and then says that the app needs to be updated for some other set of permissions that was not requested (eg. merge customers)
Others are reporting the same issue here: The GraphiQL app runs into permissions issues in my staff account - Shopify Community
1 Like
Hey @Nic_Oliver .
Typically you would see an error like that if your staff account didn’t have the permissions you were requesting in the app, but merge customers and write discounts don’t seem related.
I’ve reached out to our team internally here to get some clarity. I’ll let you know once I find out more.
Hey again @Nic_Oliver
I have an update for you. We have created an internal issue for investigating this further. I don’t currently have a timeline on a resolution. In the meantime, when you run in to these errors, having the store owner approve any updates to scope should work.
Alternatively, spinning up a custom app for testing within your client stores would work as well. That would also give you more control over requesting the necessary access scopes, only requesting exactly what you need for testing.
Thanks @KyleG-Shopify
We did end up getting the scopes updated, which resolved the issue for this client, but could be a problem with other clients.
We do have a custom app set up; however to our understanding, it’s not possible to use GraphiQL in the CLI / in the app’s context, on a non-development store. If there was a way to do that, it would solve the problem.
For context, the app does not have an admin UI as it is a one-off for a client store, and can easily be managed by a developer using GraphiQL when changes need to be made.
You have that right, the CLI graphiql tool currently only works with the connected development store.
The graphiql tool is a fork of this opensource project here: GitHub - graphql/graphiql: GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools. . I have heard of some partners building it in to their own app to help with troubleshooting.
Using an API client like Postman or Insomnia would be the easiest way though.