Discuss all the new features introduced with the new product model in GraphQL.
I'm attempting to use the productOptionUpdate mutation but when I try to set linkedMetafield and linkedMetafieldValue, I am getting the error "option, linkedMetafield: Linked options are not supported for this shop."
I am using the Development store for the extended variants. Is there a way to get permission to use these metafields?
Here's the mutation I'm attempting to use:
mutation productOptionUpdate( $productId: ID!, $option: OptionUpdateInput!, $optionValuesToUpdate: [OptionValueUpdateInput!], $variantStrategy: ProductOptionUpdateVariantStrategy ) { productOptionUpdate( productId: $productId, option: $option, optionValuesToUpdate: $optionValuesToUpdate, variantStrategy: $variantStrategy ) { product { id options { id name values position optionValues { id name hasVariants } } } userErrors { field message } } }
And here are the variables I'm passing:
const variables = { productId: "gid://shopify/Product/9874", option: { id: "gid://shopify/ProductOption/4321", linkedMetafield: { namespace: "test1", key: "key1", }, }, optionValuesToUpdate: [ { id: "gid://shopify/ProductOptionValue/1234", linkedMetafieldValue: "example", } ], };
And here is the development store I am using:
Solved! Go to the solution
This is an accepted solution.
Hello @Nexzer
You are right. The linkedMetafield is only available to shops in beta and will soon be available to all shops.. Please watch out on the change log for updates.
Thanks
ALIAS | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hello @Nexzer
You are right. The linkedMetafield is only available to shops in beta and will soon be available to all shops.. Please watch out on the change log for updates.
Thanks
ALIAS | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
I am using a beta store. Developer preview "extended variants" and its still not letting me use the meta fields.
My question of this post is what type of beta store do I need to use to test these metafields?