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

I am trying to use the Shopify discount allocator function from https://shopify.dev/docs/api/functions/reference/discounts-allocator
and 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 the error GraphqlQueryError: Field ‘discountsAllocatorFunctionRegister’ doesn’t exist on type ‘Mutation’ and even used the Shopify Graphql app too but didn’t recognize the discountsAllocatorFunctionRegister to exist on type ‘Mutation’

Hey Mahdi!

The discountsAllocatorFunctionRegister is not probably available on version you’re working. It’s still unstable.

Thanks

Yep, this feature is still unstable and will most likely be included in the next release.