Hi, i am trying to query all my products with all corresponding metafields. When i try to create new bulk query operation I get response with error “Selections can’t be made directly on unions (see selections on MetafieldReference)”. How can i get my products and metafields linked together?
I am using GraphQL Admin API.
Thanks for any help.
Here asi my query:
mutation {
bulkOperationRunQuery(
query: """
{
products {
edges {
node {
title
id
metafields {
edges {
node {
id
key
value
references {
edges {
node {
id
... on Metaobject {
type
fields {
key
value
}
}
}
}
}
}
}
}
}
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}