How to fetch metafields from multiple namespaces

When querying metafields, a namespace and set of keys are required.  To request metafields from different namespaces, you can use GraphQL aliases. For example:

query metafieldsTest {

site {

product(entityId: 103) {

entityId

name

space48Metafields: metafields(

namespace: "space48"

keys: ["test_one"]

) {

edges {

node {

key

value

}

}

},

othernamespaceMetafields: metafields(

namespace: "other_namespace"

keys: ["test_two"]

) {

edges {

node {

key

value

}

}

}

}

}

}

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us