# products - admin-graphql - QUERY Version: 2025-01 ## Description Returns a list of products. ### Access Scopes ## Arguments * [after](/docs/api/admin-graphql/2025-01/scalars/String): String - The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * [before](/docs/api/admin-graphql/2025-01/scalars/String): String - The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * [first](/docs/api/admin-graphql/2025-01/scalars/Int): Int - The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * [last](/docs/api/admin-graphql/2025-01/scalars/Int): Int - The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * [query](/docs/api/admin-graphql/2025-01/scalars/String): String - A filter made up of terms, connectives, modifiers, and comparators. | name | type | description | acceptable_values | default_value | example_use | | ---- | ---- | ---- | ---- | ---- | ---- | | default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`
- `query=title:green hoodie` | | barcode | string | Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field. | | | - `barcode:ABC-abc-1234` | | bundles | boolean | Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount. | | | - `bundles:true` | | category_id | string | Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17). | | | - `category_id:sg-4-17-2-17` | | collection_id | id | Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field. | | | - `collection_id:108179161409` | | combined_listing_role | string | Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings). | - `parent`
- `child`
- `no_role` | | - `combined_listing_role:parent` | | created_at | time | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`
- `created_at: - `created_at:<='2024'` | | delivery_profile_id | id | Filter by the delivery profile [`id`](https://shopify.dev/api/admin-graphql/latest/objects/DeliveryProfile#field-id) field. | | | - `delivery_profile_id:108179161409` | | error_feedback | string | Filter by products with publishing errors. | | gift_card | boolean | Filter by the product [`isGiftCard`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-isgiftcard) field. | | | - `gift_card:true` | | handle | string | Filter by a comma-separated list of product [handles](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-handle). | | | - `handle:the-minimal-snowboard` | | has_only_composites | boolean | Filter by products that have only composite variants. | | | - `has_only_composites:true` | | has_only_default_variant | boolean | Filter by products that have only a default variant. A default variant is the only variant if no other variants are specified. | | | - `has_only_default_variant:true` | | has_variant_with_components | boolean | Filter by products that have variants with associated components. | | | - `has_variant_with_components:true` | | id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` | | inventory_total | integer | Filter by inventory count. | | | - `inventory_total:0`
- `inventory_total:>150`
- `inventory_total:>=200` | | is_price_reduced | boolean | Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object. | | | - `is_price_reduced:true` | | out_of_stock_somewhere | boolean | Filter by products that are out of stock in at least one location. | | | - `out_of_stock_somewhere:true` | | price | bigdecimal | Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field. | | | - `price:100.57` | | product_configuration_owner | string | Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field. | | | - `product_configuration_owner:10001` | | product_publication_status | string | Filter by the publishable status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid values. | - `approved`
- `rejected`
- `needs_action`
- `awaiting_review`
- `published`
- `demoted`
- `scheduled`
- `provisionally_published` | | - `publishable_status:189769876-approved` | | product_type | string | Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type). | | | - `product_type:snowboard` | | publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - `publication_ids:184111530305,184111694145` | | publishable_status | string | Filter by the publishable status of the resource on a channel, such as the online store. The value is a composite of either the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) or [channel `name`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Channel#field-name) and one of the valid values. | - `online_store_channel`
- `published`
- `unpublished`
- `visible`
- `unavailable`
- `hidden`
- `intended`
- `visible` | | - `publishable_status:published`
- `publishable_status:189769876:visible`
- `publishable_status:pos:hidden` | | published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - `published_at:>2020-10-21T23:39:20Z`
- `published_at: - `published_at:<=2024` | | published_status | string | Filter by the published status of the resource on a channel, such as the online store. | - `unset`
- `pending`
- `approved`
- `not approved` | | - `published_status:approved` | | sku | string | Filter by the product variant [`sku`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-sku) field. [Learn more about SKUs](https://help.shopify.com/manual/products/details/sku). | | | - `sku:XYZ-12345` | | status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an `ACTIVE` status in online stores, sales channels, and apps. | - `ACTIVE`
- `ARCHIVED`
- `DRAFT` | `ACTIVE` | - `status:ACTIVE,DRAFT` | | tag | string | Filter objects by the `tag` field. | | | - `tag:my_tag` | | tag_not | string | Filter by objects that don’t have the specified tag. | | | - `tag_not:my_tag` | | title | string | Filter by the product [`title`](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-title) field. | | | - `title:The Minimal Snowboard` | | updated_at | time | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`
- `updated_at: - `updated_at:<='2024'` | | variant_id | id | Filter by the product variant [`id`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-id) field. | | | - `variant_id:45779434701121` | | variant_title | string | Filter by the product variant [`title`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-title) field. | | | - `variant_title:'Special ski wax'` | | vendor | string | Filter by the origin or source of the product. Learn more about [vendors and managing vendor information](https://help.shopify.com/manual/products/managing-vendor-info). | | | - `vendor:Snowdevil`
- `vendor:Snowdevil OR vendor:Icedevil` | You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * [reverse](/docs/api/admin-graphql/2025-01/scalars/Boolean): Boolean - Reverse the order of the underlying list. * [savedSearchId](/docs/api/admin-graphql/2025-01/scalars/ID): ID - The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). The search’s query string is used as the query argument. * [sortKey](/docs/api/admin-graphql/2025-01/enums/ProductSortKeys): ProductSortKeys - Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations). ## Returns * [edges](/docs/api/admin-graphql/2025-01/objects/ProductEdge): ProductEdge! The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. * [nodes](/docs/api/admin-graphql/2025-01/objects/Product): Product! A list of nodes that are contained in ProductEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. * [pageInfo](/docs/api/admin-graphql/2025-01/objects/PageInfo): PageInfo! An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. ## Examples ### Get 10 products after a given cursor and whether or not there is a subsequent page of results Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { products(first: 10, after: \\\"eyJsYXN0X2lkIjoyMDk5NTY0MiwibGFzdF92YWx1ZSI6IjIwOTk1NjQyIn0=\\\") { edges { node { id title handle } cursor } pageInfo { hasNextPage } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n products(first: 10, after: \"eyJsYXN0X2lkIjoyMDk5NTY0MiwibGFzdF92YWx1ZSI6IjIwOTk1NjQyIn0=\") {\n edges {\n node {\n id\n title\n handle\n }\n cursor\n }\n pageInfo {\n hasNextPage\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n products(first: 10, after: \"eyJsYXN0X2lkIjoyMDk5NTY0MiwibGFzdF92YWx1ZSI6IjIwOTk1NjQyIn0=\") {\n edges {\n node {\n id\n title\n handle\n }\n cursor\n }\n pageInfo {\n hasNextPage\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n products(first: 10, after: \"eyJsYXN0X2lkIjoyMDk5NTY0MiwibGFzdF92YWx1ZSI6IjIwOTk1NjQyIn0=\") {\n edges {\n node {\n id\n title\n handle\n }\n cursor\n }\n pageInfo {\n hasNextPage\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n products(first: 10, after: \"eyJsYXN0X2lkIjoyMDk5NTY0MiwibGFzdF92YWx1ZSI6IjIwOTk1NjQyIn0=\") {\n edges {\n node {\n id\n title\n handle\n }\n cursor\n }\n pageInfo {\n hasNextPage\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "node": { "id": "gid://shopify/Product/108828309", "title": "Draft", "handle": "draft" }, "cursor": "eyJsYXN0X2lkIjoxMDg4MjgzMDksImxhc3RfdmFsdWUiOiIxMDg4MjgzMDkifQ==" }, { "node": { "id": "gid://shopify/Product/121709582", "title": "Boots", "handle": "boots" }, "cursor": "eyJsYXN0X2lkIjoxMjE3MDk1ODIsImxhc3RfdmFsdWUiOiIxMjE3MDk1ODIifQ==" }, { "node": { "id": "gid://shopify/Product/440089423", "title": "IPod Nano - 8GB", "handle": "ipod-nano" }, "cursor": "eyJsYXN0X2lkIjo0NDAwODk0MjMsImxhc3RfdmFsdWUiOiI0NDAwODk0MjMifQ==" }, { "node": { "id": "gid://shopify/Product/558169081", "title": "Unpublished Boots", "handle": "unpublished_boots" }, "cursor": "eyJsYXN0X2lkIjo1NTgxNjkwODEsImxhc3RfdmFsdWUiOiI1NTgxNjkwODEifQ==" }, { "node": { "id": "gid://shopify/Product/910489600", "title": "Crafty Shoes", "handle": "crappy-shoes" }, "cursor": "eyJsYXN0X2lkIjo5MTA0ODk2MDAsImxhc3RfdmFsdWUiOiI5MTA0ODk2MDAifQ==" }, { "node": { "id": "gid://shopify/Product/912855135", "title": "SEO Boots", "handle": "seo_boots" }, "cursor": "eyJsYXN0X2lkIjo5MTI4NTUxMzUsImxhc3RfdmFsdWUiOiI5MTI4NTUxMzUifQ==" } ], "pageInfo": { "hasNextPage": false } } } } ### Get multiple sets of products with a single query using aliases to name the results Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { newestProducts: products(first: 5, reverse: true) { edges { node { id title } } } oldestProducts: products(first: 5) { edges { node { id title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n newestProducts: products(first: 5, reverse: true) {\n edges {\n node {\n id\n title\n }\n }\n }\n oldestProducts: products(first: 5) {\n edges {\n node {\n id\n title\n }\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n newestProducts: products(first: 5, reverse: true) {\n edges {\n node {\n id\n title\n }\n }\n }\n oldestProducts: products(first: 5) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n newestProducts: products(first: 5, reverse: true) {\n edges {\n node {\n id\n title\n }\n }\n }\n oldestProducts: products(first: 5) {\n edges {\n node {\n id\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n newestProducts: products(first: 5, reverse: true) {\n edges {\n node {\n id\n title\n }\n }\n }\n oldestProducts: products(first: 5) {\n edges {\n node {\n id\n title\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "newestProducts": { "edges": [ { "node": { "id": "gid://shopify/Product/912855135", "title": "SEO Boots" } }, { "node": { "id": "gid://shopify/Product/910489600", "title": "Crafty Shoes" } }, { "node": { "id": "gid://shopify/Product/558169081", "title": "Unpublished Boots" } }, { "node": { "id": "gid://shopify/Product/440089423", "title": "IPod Nano - 8GB" } }, { "node": { "id": "gid://shopify/Product/121709582", "title": "Boots" } } ] }, "oldestProducts": { "edges": [ { "node": { "id": "gid://shopify/Product/20995642", "title": "Element" } }, { "node": { "id": "gid://shopify/Product/108828309", "title": "Draft" } }, { "node": { "id": "gid://shopify/Product/121709582", "title": "Boots" } }, { "node": { "id": "gid://shopify/Product/440089423", "title": "IPod Nano - 8GB" } }, { "node": { "id": "gid://shopify/Product/558169081", "title": "Unpublished Boots" } } ] } } } ### Get the 10 most recently created products Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { products(first: 10, reverse: true) { edges { node { id title handle resourcePublicationOnCurrentPublication { publication { name id } publishDate isPublished } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n products(first: 10, reverse: true) {\n edges {\n node {\n id\n title\n handle\n resourcePublicationOnCurrentPublication {\n publication {\n name\n id\n }\n publishDate\n isPublished\n }\n }\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n products(first: 10, reverse: true) {\n edges {\n node {\n id\n title\n handle\n resourcePublicationOnCurrentPublication {\n publication {\n name\n id\n }\n publishDate\n isPublished\n }\n }\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n products(first: 10, reverse: true) {\n edges {\n node {\n id\n title\n handle\n resourcePublicationOnCurrentPublication {\n publication {\n name\n id\n }\n publishDate\n isPublished\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n products(first: 10, reverse: true) {\n edges {\n node {\n id\n title\n handle\n resourcePublicationOnCurrentPublication {\n publication {\n name\n id\n }\n publishDate\n isPublished\n }\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "node": { "id": "gid://shopify/Product/912855135", "title": "SEO Boots", "handle": "seo_boots", "resourcePublicationOnCurrentPublication": null } }, { "node": { "id": "gid://shopify/Product/910489600", "title": "Crafty Shoes", "handle": "crappy-shoes", "resourcePublicationOnCurrentPublication": null } }, { "node": { "id": "gid://shopify/Product/558169081", "title": "Unpublished Boots", "handle": "unpublished_boots", "resourcePublicationOnCurrentPublication": null } }, { "node": { "id": "gid://shopify/Product/440089423", "title": "IPod Nano - 8GB", "handle": "ipod-nano", "resourcePublicationOnCurrentPublication": null } }, { "node": { "id": "gid://shopify/Product/121709582", "title": "Boots", "handle": "boots", "resourcePublicationOnCurrentPublication": null } }, { "node": { "id": "gid://shopify/Product/108828309", "title": "Draft", "handle": "draft", "resourcePublicationOnCurrentPublication": { "publication": { "name": "Generic Channel", "id": "gid://shopify/Publication/762454635" }, "publishDate": "2005-01-02T00:00:00Z", "isPublished": true } } }, { "node": { "id": "gid://shopify/Product/20995642", "title": "Element", "handle": "element", "resourcePublicationOnCurrentPublication": null } } ] } } } ### Get the first 10 products of a specific product type Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { products(first: 10, query: \\\"product_type:snowboards\\\") { edges { node { title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n products(first: 10, query: \"product_type:snowboards\") {\n edges {\n node {\n title\n }\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n products(first: 10, query: \"product_type:snowboards\") {\n edges {\n node {\n title\n }\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n products(first: 10, query: \"product_type:snowboards\") {\n edges {\n node {\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n products(first: 10, query: \"product_type:snowboards\") {\n edges {\n node {\n title\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "node": { "title": "Element" } }, { "node": { "title": "Draft" } } ] } } } ### Get the first 10 products updated after the specified date Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { products(first: 10, query: \\\"updated_at:>2019-12-01\\\") { edges { node { id updatedAt } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n products(first: 10, query: \"updated_at:>2019-12-01\") {\n edges {\n node {\n id\n updatedAt\n }\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n products(first: 10, query: \"updated_at:>2019-12-01\") {\n edges {\n node {\n id\n updatedAt\n }\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n products(first: 10, query: \"updated_at:>2019-12-01\") {\n edges {\n node {\n id\n updatedAt\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n products(first: 10, query: \"updated_at:>2019-12-01\") {\n edges {\n node {\n id\n updatedAt\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "node": { "id": "gid://shopify/Product/440089423", "updatedAt": "2021-12-01T12:14:52Z" } } ] } } } ### Get the total inventory and price range of three products using a fragment Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { Glasses: product(id: \\\"gid://shopify/Product/20995642\\\") { ...productInformation } Shoes: product(id: \\\"gid://shopify/Product/910489600\\\") { ...productInformation } Bracelet: product(id: \\\"gid://shopify/Product/108828309\\\") { ...productInformation } } fragment productInformation on Product { totalInventory priceRange { minVariantPrice { amount } maxVariantPrice { amount } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n Glasses: product(id: \"gid://shopify/Product/20995642\") {\n ...productInformation\n }\n Shoes: product(id: \"gid://shopify/Product/910489600\") {\n ...productInformation\n }\n Bracelet: product(id: \"gid://shopify/Product/108828309\") {\n ...productInformation\n }\n }\n \n fragment productInformation on Product {\n totalInventory\n priceRange {\n minVariantPrice {\n amount\n }\n maxVariantPrice {\n amount\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n Glasses: product(id: \"gid://shopify/Product/20995642\") {\n ...productInformation\n }\n Shoes: product(id: \"gid://shopify/Product/910489600\") {\n ...productInformation\n }\n Bracelet: product(id: \"gid://shopify/Product/108828309\") {\n ...productInformation\n }\n }\n \n fragment productInformation on Product {\n totalInventory\n priceRange {\n minVariantPrice {\n amount\n }\n maxVariantPrice {\n amount\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n Glasses: product(id: \"gid://shopify/Product/20995642\") {\n ...productInformation\n }\n Shoes: product(id: \"gid://shopify/Product/910489600\") {\n ...productInformation\n }\n Bracelet: product(id: \"gid://shopify/Product/108828309\") {\n ...productInformation\n }\n }\n \n fragment productInformation on Product {\n totalInventory\n priceRange {\n minVariantPrice {\n amount\n }\n maxVariantPrice {\n amount\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n Glasses: product(id: \"gid://shopify/Product/20995642\") {\n ...productInformation\n }\n Shoes: product(id: \"gid://shopify/Product/910489600\") {\n ...productInformation\n }\n Bracelet: product(id: \"gid://shopify/Product/108828309\") {\n ...productInformation\n }\n}\n\nfragment productInformation on Product {\n totalInventory\n priceRange {\n minVariantPrice {\n amount\n }\n maxVariantPrice {\n amount\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "Glasses": { "totalInventory": 19, "priceRange": { "minVariantPrice": { "amount": "1000.0" }, "maxVariantPrice": { "amount": "1500.0" } } }, "Shoes": { "totalInventory": 4000, "priceRange": { "minVariantPrice": { "amount": "10000.0" }, "maxVariantPrice": { "amount": "10000.0" } } }, "Bracelet": { "totalInventory": 1, "priceRange": { "minVariantPrice": { "amount": "1000.0" }, "maxVariantPrice": { "amount": "1000.0" } } } } } ### Get two specific products by their ID using aliases Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { glasses: product(id: \\\"gid://shopify/Product/108828309\\\") { title description } shoes: product(id: \\\"gid://shopify/Product/910489600\\\") { title description } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n glasses: product(id: \"gid://shopify/Product/108828309\") {\n title\n description\n }\n shoes: product(id: \"gid://shopify/Product/910489600\") {\n title\n description\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n glasses: product(id: \"gid://shopify/Product/108828309\") {\n title\n description\n }\n shoes: product(id: \"gid://shopify/Product/910489600\") {\n title\n description\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n glasses: product(id: \"gid://shopify/Product/108828309\") {\n title\n description\n }\n shoes: product(id: \"gid://shopify/Product/910489600\") {\n title\n description\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n glasses: product(id: \"gid://shopify/Product/108828309\") {\n title\n description\n }\n shoes: product(id: \"gid://shopify/Product/910489600\") {\n title\n description\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "glasses": { "title": "Cool Glasses", "description": "Cool Glasses" }, "shoes": { "title": "Crafty Shoes", "description": "Crafty Shoes" } } } ### Retrieve product_ids that are published to your app Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query ProductList { products(first: 2) { nodes { publishedOnCurrentPublication id } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query ProductList {\n products(first: 2) {\n nodes {\n publishedOnCurrentPublication\n id\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query ProductList {\n products(first: 2) {\n nodes {\n publishedOnCurrentPublication\n id\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query ProductList {\n products(first: 2) {\n nodes {\n publishedOnCurrentPublication\n id\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query ProductList {\n products(first: 2) {\n nodes {\n publishedOnCurrentPublication\n id\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "nodes": [ { "publishedOnCurrentPublication": true, "id": "gid://shopify/Product/20995642" }, { "publishedOnCurrentPublication": true, "id": "gid://shopify/Product/108828309" } ] } } } ### Retrieve a list of products Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query GetProducts { products(first: 10) { nodes { id title } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query GetProducts {\n products(first: 10) {\n nodes {\n id\n title\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query GetProducts {\n products(first: 10) {\n nodes {\n id\n title\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query GetProducts {\n products(first: 10) {\n nodes {\n id\n title\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query GetProducts {\n products(first: 10) {\n nodes {\n id\n title\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "nodes": [ { "id": "gid://shopify/Product/20995642", "title": "Element" }, { "id": "gid://shopify/Product/108828309", "title": "Draft" }, { "id": "gid://shopify/Product/121709582", "title": "Boots" }, { "id": "gid://shopify/Product/440089423", "title": "IPod Nano - 8GB" }, { "id": "gid://shopify/Product/558169081", "title": "Unpublished Boots" }, { "id": "gid://shopify/Product/910489600", "title": "Crafty Shoes" }, { "id": "gid://shopify/Product/912855135", "title": "SEO Boots" } ] } } } ### Retrieve product listings that are published to your app Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query ProductList { products(first: 2) { nodes { publishedOnCurrentPublication id createdAt updatedAt descriptionHtml handle productType title vendor tags publishedAt variants(first: 10) { nodes { id } } images(first: 10) { nodes { id height width url } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query ProductList {\n products(first: 2) {\n nodes {\n publishedOnCurrentPublication\n id\n createdAt\n updatedAt\n descriptionHtml\n handle\n productType\n title\n vendor\n tags\n publishedAt\n variants(first: 10) {\n nodes {\n id\n }\n }\n images(first: 10) {\n nodes {\n id\n height\n width\n url\n }\n }\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query ProductList {\n products(first: 2) {\n nodes {\n publishedOnCurrentPublication\n id\n createdAt\n updatedAt\n descriptionHtml\n handle\n productType\n title\n vendor\n tags\n publishedAt\n variants(first: 10) {\n nodes {\n id\n }\n }\n images(first: 10) {\n nodes {\n id\n height\n width\n url\n }\n }\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query ProductList {\n products(first: 2) {\n nodes {\n publishedOnCurrentPublication\n id\n createdAt\n updatedAt\n descriptionHtml\n handle\n productType\n title\n vendor\n tags\n publishedAt\n variants(first: 10) {\n nodes {\n id\n }\n }\n images(first: 10) {\n nodes {\n id\n height\n width\n url\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query ProductList {\n products(first: 2) {\n nodes {\n publishedOnCurrentPublication\n id\n createdAt\n updatedAt\n descriptionHtml\n handle\n productType\n title\n vendor\n tags\n publishedAt\n variants(first: 10) {\n nodes {\n id\n }\n }\n images(first: 10) {\n nodes {\n id\n height\n width\n url\n }\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "nodes": [ { "publishedOnCurrentPublication": true, "id": "gid://shopify/Product/20995642", "createdAt": "2005-01-01T00:00:00Z", "updatedAt": "2005-01-01T00:00:00Z", "descriptionHtml": "

bad board

", "handle": "element", "productType": "Snowboards", "title": "Element", "vendor": "Arbor", "tags": [], "publishedAt": "2005-01-01T00:00:00Z", "variants": { "nodes": [ { "id": "gid://shopify/ProductVariant/30322695" }, { "id": "gid://shopify/ProductVariant/113711323" }, { "id": "gid://shopify/ProductVariant/236948360" } ] }, "images": { "nodes": [ { "id": "gid://shopify/ProductImage/916933471", "height": 400, "width": 85, "url": "https://cdn.shopify.com/s/files/1/2637/1970/products/element58.jpg?v=1733171181" }, { "id": "gid://shopify/ProductImage/671149505", "height": 110, "width": 372, "url": "https://cdn.shopify.com/s/files/1/2637/1970/products/bacon.jpg?v=1733171181" } ] } }, { "publishedOnCurrentPublication": true, "id": "gid://shopify/Product/108828309", "createdAt": "2005-01-02T00:00:00Z", "updatedAt": "2005-01-02T00:00:00Z", "descriptionHtml": "

good board

", "handle": "draft", "productType": "Snowboards", "title": "Draft", "vendor": "Arbor", "tags": [ "Deepsnow", "Dub Quote\"s", "quote's", "Wooden Core" ], "publishedAt": "2005-01-02T00:00:00Z", "variants": { "nodes": [ { "id": "gid://shopify/ProductVariant/43729076" } ] }, "images": { "nodes": [ { "id": "gid://shopify/ProductImage/183532652", "height": 400, "width": 85, "url": "https://cdn.shopify.com/s/files/1/2637/1970/products/draft58.jpg?v=1733171181" }, { "id": "gid://shopify/ProductImage/731367280", "height": 400, "width": 85, "url": "https://cdn.shopify.com/s/files/1/2637/1970/products/draft59.jpg?v=1733171181" } ] } } ] } } }