A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
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?
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
This is whole request with body and variables i am trying with. I tried again just now
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
}
Was able to make `standardMetafieldDefinitionEnable` work on the following versions: 2022-07(Release candidate) / Unstable. Doesn't work on the latest one for me.