A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hey,
This page states meta for locations are supported; however, when we checked the API document, no such info about it.
But then found it is under unstable.
Questions are
Best,
Billy
Hi Billy,
Metafields on Locations are supported through the API, but only in the unstable version for now.
In terms of examples there are a couple in the link you shared to the unstable GraphQL docs.
Like getting metafields attached to a location:
query LocationMetafields($ownerId: ID!) {
location(id: $ownerId) {
metafields(first: 3) {
edges {
node {
namespace
key
value
}
}
}
}
}
If you want to set metafields on a location you can use the metafieldsSet mutation passing in the GID of a location as the ownerID.
Hope that helps!
To learn more visit the Shopify Help Center or the Community Blog.
hi Danloomer,
Thank you for your reply.
I also did some research and noticed metafields can be access through 2022-07 version but not able to place them.
Do you know when such future will be release as a stable?