Find ids on empty product variant metafields

blackstonekey
Shopify Partner
1 0 0

I have a GraphQL query that returns a variant's metafields.

 

{
    productVariant(id: "gid://shopify/ProductVariant/123456789") {
        title
        metafields(namespace: "custom", first: 10) {
            nodes {
                id
                key
                type
                value
            }
        }
    }
}

This works fine, but it will only return metafields that contain values. I am new to GraphQL but I understand this may be because the fields are nullable. 

 

I need to find the ids of all the metafields on a given variant - How can I achieve this?

Replies 0 (0)