Development discussions around Shopify APIs
Hi all,
I'm trying to add/update privateMetafield in Product/Collection following docs (https://shopify.dev/apps/metafields/private) but unfortunately I'm getting "Internal Error":
[GraphQL error]: Message: Internal error. Looks like something went wrong on our end.
Request ID: 2b568498-35e9-4d2e-b735-b90ca8f40701 (include this in support requests)., Location: undefined, Path: undefined
gql
mutation ($input: CollectionInput!){
collectionUpdate(input: $input) {
collection {
privateMetafields(first:10) {
edges {
node {
namespace
key
value
}
}
}
}
}
}
Input data
{
input: {
id: collectionId,
privateMetafields: [{
namespace: "myNameSpace",
key: "myKey",
valueInput: {
value: "myData",
valueType: "STRING"
}
}]
}
}
Thank you for providing the x-request-id for your API request. I had a look and saw that you're using the type "string" which has been deprecated. You will want to use either single_line_text_field or multiple_line_text_field.
You can see the currently valid types here: https://shopify.dev/apps/metafields/definitions/types
I'll follow up with you as well via your support ticket, as I'm not 100% certain that is the cause of the errors you've been receiving.
CS | 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
uhm so PrivateMetafields has the same available type of Metafields?
btw I fixed the problem on products so I'm able to set privateMetafields on it, but I have 2 more questions:
Thanks.
User | RANK |
---|---|
54 | |
11 | |
7 | |
7 | |
4 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023