Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shopify GraphiQL installed on development store but doesn't perform mutations any more.

Solved

Shopify GraphiQL installed on development store but doesn't perform mutations any more.

simonsnowden
Shopify Partner
3 0 0

Playing with some mutations as I have done previously - but it appears to have stopped working.

 

Trying a simple mutation such as this:

 

mutation MyMutation { productCreate(input: {title: "A product"}) { product { id title descriptionHtml } } }

 

and I get this back:

 

{ "data": { "productCreate": null }, "errors": [ { "message": "Access denied for productCreate field. Required access: write_products access scope.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "productCreate" ], "extensions": { "code": "ACCESS_DENIED", "documentation": "https://shopify.dev/api/usage/access-scopes", "requiredAccess": "write_products access scope." } } ], "extensions": { "cost": { "requestedQueryCost": 10, "actualQueryCost": 10, "throttleStatus": { "maximumAvailable": 1000, "currentlyAvailable": 990, "restoreRate": 50 } } }

 

So it looks like the app no longer supports write access.

 

Is this correct?

 

I have used it for mutations previously (and very helpful it is) but after what appears to be an updated version of the app. This functionality has disappeared.

 

On the demo of the app on the "GraphiQL Admin Explorer" page for the GraphQL API it says this"

 

"This is a read-only demo. To build queries and mutations install Shopify's GraphiQL app"

 

... which suggests that we should be able to perform mutations.

 

Any ideas?

 

Thanks in advance.

Accepted Solution (1)
GrahamS
Shopify Staff (Retired)
193 37 55

This is an accepted solution.

Hello @simonsnowden ,

 

The link on the page you shared should take you to a screen that looks like this, where you can set and accept permissions, as well as state which shop you want the app to be installed to:

 

18-49-otmbo-fj4po

 

Make sure you are logged into your partner account when opening the link on the Docs page to this install URL, otherwise it will just expand the read-only interface into a new tab without installing anything.

 

If you continue to encounter the same issue, I would recommend directly contacting support via our chat function - they will be able to authenticate you and look directly into your shop and account to see why the installation isn't working properly, which is something I can't do via forum troubleshooting.

 

Best,

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 4 (4)

GrahamS
Shopify Staff (Retired)
193 37 55

Hello @simonsnowden ,

 

The GraphiQL app should definitely have write capabilities. Are you able to uninstall and reinstall the app, and select all of the appropriate write permissions during the reinstallation process? I ran a product create test on my own copy of the same app but didn't encounter any issues, so I suspect that the issue is specific to your shop's installation of it.

To learn more visit the Shopify Help Center or the Community Blog.

simonsnowden
Shopify Partner
3 0 0

Hi @GrahamS ,

 

thanks for getting back to me.

 

A bit more context may be helpful. 

 

For the last couple of years, I have been using the GraphiQL app with no problems. A fantastic tool for exploring the GraphQL API on Shopify and has helped my developments no end. Last week it was working fine and dandy.

 

This week I went in and the app wouldn't load at all. Issues with cookies (I am using Chrome version 98.0.4758.102) so I went and deleted all of the cookies relating to the development store. Still, no joy so deleted and reinstalled the app and deleted cookies again. The app now worked.

 

Did a view of basic queries and all was fine. However, when I moved to mutations I started getting the error I posted above. I wondered if I had missed agreeing to certain scopes so deleted the app once more and reinstalled trying to take special note of what was being asked about scopes. It does all seem to read as if it is read-only in the scopes.

 

Since your post, I have tried to reinstall it again (from the link on this page https://shopify.dev/apps/tools/graphiql-admin-api), but I cannot see anything that would allow write access and it does seem to be saying that it only allows read-only access now. I am still not allowed write access.

 

So I'm afraid I still only have read access. Any and all suggestions are appreciated.

 

Best Wishes

 

Simon

GrahamS
Shopify Staff (Retired)
193 37 55

This is an accepted solution.

Hello @simonsnowden ,

 

The link on the page you shared should take you to a screen that looks like this, where you can set and accept permissions, as well as state which shop you want the app to be installed to:

 

18-49-otmbo-fj4po

 

Make sure you are logged into your partner account when opening the link on the Docs page to this install URL, otherwise it will just expand the read-only interface into a new tab without installing anything.

 

If you continue to encounter the same issue, I would recommend directly contacting support via our chat function - they will be able to authenticate you and look directly into your shop and account to see why the installation isn't working properly, which is something I can't do via forum troubleshooting.

 

Best,

To learn more visit the Shopify Help Center or the Community Blog.

simonsnowden
Shopify Partner
3 0 0

Hi @GrahamS ,

 

hate to admit it on a public forum - but how stupid am I????

 

I just saw the install button and moved on in my haste.

 

Thank you so much for your patience (and I'm sure I stretched it a bit - sorry, a lot).

 

Have a great one.

 

Best Wishes

 

Simon