Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Issue related to standard meta-fields template enabled

Issue related to standard meta-fields template enabled

abdulhaseeb
Shopify Partner
6 0 0

I want to ask that i am trying to update metafields as reviews.rating and reviews.rating_count using mutation (standardMetafieldDefinitionEnable) but it gives me internal server error wit requestID issue. can anyone tell me what can be the exact issue?

abdulhaseeb_0-1656405352245.png

 

Replies 4 (4)

Alan
Shopify Staff
129 15 25

Hey @abdulhaseeb - thanks for getting in touch, definitely very odd. I was able to do some testing on my end and wasn't able to replicate the issue when I tried using the regular standardMetafieldDefinitionEnable mutation found in our dev docs. I was able to pull some information from our logs based on the request ID you shared though, and it appears that there could be something in the body of the GraphQL call that caused the 500 error. 

 

Could you share the full body of the request (including the variables) in plain text or as an example code block in the forum? I can try the exact same call in my testing environment to see if I get the same error and we can work back from there. 

 

Hope to hear from you soon - let us know if we can clarify anything on our end. 

 

Cheers!

Alan | API Support @ 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

abdulhaseeb
Shopify Partner
6 0 0

This is whole request with body and variables i am trying with. I tried again just now

abdulhaseeb_0-1656575653745.png

 

abdulhaseeb
Shopify Partner
6 0 0

Here is Plain text 

mutation standardMetafieldDefinitionEnable($id: ID!, $ownerType: MetafieldOwnerType!, $pin: Boolean!, $visibleToStorefrontApi: Boolean!) {
  standardMetafieldDefinitionEnable(id: $id, ownerType: $ownerType, pin: $pin, visibleToStorefrontApi: $visibleToStorefrontApi) {
    createdDefinition {
        name
        key
        namespace
        description
    }
    userErrors {
      field
      message
    }
  }
}

 

Variables Input :

{
  "id": "gid://shopify/StandardMetafieldDefinitionTemplate/6",
  "ownerType": "PRODUCT",
  "pin": false,
  "visibleToStorefrontApi": true
}
abdulhaseeb
Shopify Partner
6 0 0

Was able to make `standardMetafieldDefinitionEnable` work on the following versions: 2022-07(Release candidate) / Unstable. Doesn't work on the latest one for me.