No content to show
User Activity
11-30-2021
It looks like you're using the Storefront API (based on the `/api/2021-10/graphql.json` URL). Metafields aren't exposed in the Storefront API by default; they require an extra step to make them visible. If you haven't explicitly done this, then I'm g...
11-17-2021
We released a new and improved metafieldsSet mutation in our GraphQL Admin API: https://shopify.dev/api/admin-graphql/2021-10/mutations/metafieldsSet as part of the 2021-10 API version.
It lets you create or update multiple (up to 25) metafields on...
This is a bug on Shopify's side as you suspected. I've created an issue internally and it should hopefully be fixed soon.
Thank you for the very detailed post.
10-14-2021
Ah that explains it. You're using dynamic sources in the theme editor to integrate metafield definitions into a theme section/block.
It looks like you've put all the metafield definitions into a single rich text field. The only way to conditionally d...
10-14-2021
Good questions!
For compatibility purposes, the new "type" attribute does accept deprecated value types as well. This was done to make the API migration less of a breaking change. Otherwise, when API clients moved from the "value_type" field to "type...
10-13-2021
I might be misunderstanding, but I'm assuming your current theme/Liquid looks something like this:
<p>Fringe: {{ product.metafields.some_namespace.fringe }}</p>
<p>Length: {{ product.metafields.some_namespace.length }}</p>
<!-- etc -->
The metafiel...
09-22-2021
Oh sorry, the successful requests I was seeing were from the Shopify GraphiQL App.
However, every single request I'm seeing from your own app has `2020-07` as the version in the URL. There must be some disconnect between the code snippet you posted h...
09-22-2021
My first guess was going to be an API version mismatch. The type field was only added in 2021-07, and GraphQL Playground likely defaults to the latest stable API version so it would work there.
However, your example code did show you using https://${...
That ID in the URL is the metafield definition ID, not the metafield itself
Instead can you confirm me that each metafield has a specific ID for each product?
Yes each metafield has its own unique ID, regardless of what resource/owner type it's a...
The error implies that you're trying to create another metafield on the product (with id 7315601883310) with the identical namespace and key. Since you're supplying a metafield id as well, my only guess is that the ID doesn't match the existing one. ...
The `type` input field only exists on API versions 2021-07 and newer and I'm guessing you're using an older API version. See https://shopify.dev/api/admin/graphql/reference/metafields/metafieldinput?api%5Bversion%5D=2021-07
Just a note that when yo...
06-28-2021
Hello, this is possible in our GraphQL API. For example, with the `productUpdate` mutation you can input multiple metafields. See https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productupdate?#productinput-fields-2021-04...
The payload is determined by the `fields` attribute you've set on the webhook subscription. So even though you set `metafield_namespaces`, you still need to include `metafields` in your `fields otherwise they won't be included in the payload.
Your input variables have "STRING" as a string value, but the valueType input field has a type of MetafieldValueType which is an enum type. To specify an enum value, it's just STRING (the unquoted "bare" value) like this:
input: {id: "gid://shopify/P...
`valueInput` only exists for private metafields, not normal metafields which is a mistake in the tutorial. Your mutation (and input) should look like this:
mutation{
productUpdate(input: {id: "gid://shopify/Product/<product_id>", metafields: [{
...
My Accepted Solutions
Subject | Views | Posted |
---|---|---|
9411 | 09-07-2021 12:00 PM | |
7976 | 08-11-2021 02:39 PM | |
4821 | 05-07-2021 02:26 PM | |
4498 | 05-07-2021 09:55 AM |