HI,
I want to activate a fulfillment constraint function using the GraphiQL app. The mutation is fulfillmentConstraintRuleUpdate
But the required write_fulfillment_constraint_rules access scope can’t be selected on the main page of the Shopify GraphiQL App Installer.
Adding the checkbox manually in the form works but is it possible to add this access scope ?
Thanks
Hi @Alexandre_Marie,
I can confirm that this is expected behaviour that the GraphiQL app doesn’t have the ability to use the write_fulfillment_constraint_rules scope, since it is expected that the app that actually deployed the function, is the same app that is registering/editing the function via the GraphQL Admin API mutation, and you are not able to deploy functions via the GraphiQL App, you would need to create a new app following the instructions in the Shopify.dev documentation, which also mentions this limitation:
From within your app, use the handle of your function to invoke the fulfillmentConstraintRuleCreate mutation to register the FulfillmentConstraintRule. The app needs to be the same app that deployed the function and has the write_fulfillment_constraint_rules access scope. You can check out this doc on how to set access scopes for the app.
Thanks for your response.
During my testing, I also observed that this function can’t be enabled via GraphiQL. I’ll proceed with building a small interface to enable/disable the function.