Hi @justinb
thanks for reaching out
I completely understand why you reached out to us about this as the process is a little different. The short version: the GraphiQL Admin app doesn’t expose write_fulfillment_constraint_rules, by design. The mutation has to be called under your app’s token, not the GraphiQL app’s. Kellan from Shopify confirmed this in a related thread:
For an extension-only app that is part of a partner organization, here are a couple different options to explore:
- Admin UI extension that calls the mutation: An
admin.block.renderoradmin.action.rendertarget can run the mutation via itsqueryAPI under your app’s session. This requires more setup, but is a self-serve option for client shops and stays within the extension-only model. - Add a lightweight backend and use token exchange : If you need a stored offline token (e.g. for webhooks, background jobs, or any flow outside an admin UI session), use token exchange to get an access token for your app. Note that at this point your app is no longer strictly extension-only
- Running
shopify app devand the using your app’s GraphiQL instance: This will work for development stores, but not for a production store outside of your partner org.
If your app is part of the same organization as the store you’re installing it on, the Client Credentials grant could be an option to check out as well to get an access token
Here’s some relevant docs to explore as well:
- Exchange a session token for an access token
- Admin UI Extensions Direct API access
- fulfillmentConstraintRuleCreate - GraphQL Admin
- Using the client credentials grant
I hope this help and let me know if you have any other questions!