Error on creating shopify metafield definition

Error on creating shopify metafield definition

Antonio84
Shopify Partner
49 1 3

When I try to create a shopify metafield definition I get:

 

Setting access controls on a definition under this namespace is not permitted

This is the graphql variable:

 

 

 

 "definition": {
            "description": "mymeta",
            "key": "mymeta",
            "name": "mymeta",
            "namespace": "features",
            "ownerType": "PRODUCT",
            "pin": True,
            "type": "single_line_text_field",
            "useAsCollectionCondition": True,
            "visibleToStorefrontApi": True
        }

 

 

 

 

Replies 2 (2)

Liam
Shopify Staff
2862 313 816

Hi Antonio,

 

It doesn't look like your variables have a `access` input field - if you add one in like in the example from our docs, does the error still appear? 

Liam | Developer Advocate @ 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

rajkmr
Shopify Partner
26 1 3

Hi @Liam 
I'm getting error `Setting access controls on a definition under this namespace is not permitted.` when I set the access input field.
I need to make the metafield visible on the storefront. Could you please guide what would be the right approach with the new API 2024-04?
Thanks

Camouflage - Hide sold out variants: https://apps.shopify.com/camouflage