Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field 'discountsAllocatorFunctionRegister' doesn't exist on type 'Mutation' #474

Open
mahdi-akbary opened this issue Mar 15, 2024 · 8 comments

Comments

@mahdi-akbary
Copy link

I am trying to use shopify discount allocator function from https://shopify.dev/docs/api/functions/reference/discounts-allocator
and in order to do it, I have to register my function using this mutation from https://shopify.dev/docs/api/admin-graphql/unstable/mutations/discountsAllocatorFunctionRegister.

mutation discountsAllocatorFunctionRegister($functionExtensionId: String!) { discountsAllocatorFunctionRegister(functionExtensionId: $functionExtensionId) { success userErrors { field message } } }

but it gives error GraphqlQueryError: Field 'discountsAllocatorFunctionRegister' doesn't exist on type 'Mutation' and even used the shopify Graphql app too but doesn't recognize the discountsAllocatorFunctionRegister to exist on type 'Mutation'

@joeainsworth
Copy link

Also getting this error.

@yossix
Copy link

yossix commented Jun 27, 2024

++

@JasonPing6
Copy link

JasonPing6 commented Jul 7, 2024

I think this api is just available on unstable version. But when I run it on shopify Graphql app, I get access deny issue, need scope write_discounts_allocator_functions

@khairali-nine15
Copy link

++

@impactcolor
Copy link

It's only available for unstable version of the api. But how do we use the unstable version?
this:
[webhooks] api_version = "unstable"

doesn't seem to work.

@mahdi-akbary
Copy link
Author

It's only available for unstable version of the api. But how do we use the unstable version? this: [webhooks] api_version = "unstable"

doesn't seem to work.

This Function API is available only in stores with the Discounts Allocator developer preview

here is the link: https://shopify.dev/docs/api/functions/reference/discounts-allocator

@impactcolor
Copy link

impactcolor commented Sep 5, 2024

@mahdi-akbary how do you activate the Discounts Allocator developer preview?
The documentation doesn't even make sense it says i'ts only available in Discounts Allocator developer view but doesn't say what that is or how to activate it

@impactcolor
Copy link

Ok I get it, it can't be added to an actual store only preview modes. Got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants