I want retrieve productVariants matches id list by GraphQL.

TORICO
New Member
1 0 0

Hi,

What GraphQL should I write to get productVariants that matches multiple ids?

Want something like this...

https://shopify.dev/tools/graphiql-admin-api

{
  productVariants(
    first:250
    ???? id: in: ['gid://shopify/ProductVariant/19523123216406', 'gid://shopify/ProductVariant/19523123937302'] ????
  ) {
    edges {
      node {
        id,
        title,
        sku,
        inventoryQuantity
      }
    }
  }
}



Like this SQL:

SELECT ... WHERE id IN (
    'gid://shopify/ProductVariant/19523123216406',
    'gid://shopify/ProductVariant/19523123937302',
    'gid://shopify/ProductVariant/19523125313558'
);

Shopify_Admin_API_GraphiQL_explorer.png

0 Likes