GraphQL Product Queries
Author:
Holger Lierse
Changed on:
4 June 2025
Overview
Sample Product Queries that can be used on a daily basis
Key points
- Sample Queries on the following:
- Variant Product (SKU) by Reference
- Variant Product (SKU) by Details
- Variant Products (SKU)
- Product by Name and Reference
Variant Product (SKU) by Reference
Retrieve a variant product (SKU) based on a reference.
Example Query:
1query QueryVariantProduct ($productCatalgoueRef:String!, $ref:String!){
2 variantProduct(catalogue: {ref:$productCatalgoueRef }, ref: $ref) {
3 id
4 ref
5 name
6 gtin
7 attributes {
8 name
9 value
10 }
11 prices {
12 value
13 }
14 status
15 }
16}
Language: json
Name: variant Product (SKU) by Reference - Query
Description:
variant Product (SKU) by Reference - Query
Example Parameters:
1{
2 "productCatalgoueRef": "COMPATIBILITY:1",
3 "ref":"19092800045"
4}
Language: json
Name: variant Product (SKU) by Reference - Parameter
Description:
variant Product (SKU) by Reference - Parameter
Variant Product (SKU) by Details
Retrieve a variant product (SKU) based on details productRefs and statuses.
Example Query:
1query QueryVariantProductByDetail($productCatalgoueRef:String!, $productRefs:[String!], $statuses:[String!]) {
2 variantProducts(catalogue: {ref: $productCatalgoueRef}, ref: $productRefs, status: $statuses) {
3 edges {
4 node {
5 id
6 ref
7 name
8 product {
9 id
10 name
11 ref
12 }
13 attributes {
14 name
15 value
16 }
17 prices {
18 value
19 }
20 status
21 }
22 }
23 }
24}
Language: json
Name: variant Product (SKU) by Details - Query
Description:
variant Product (SKU) by Details - Query
Example Parameters:
1{
2 "productCatalgoueRef": "COMPATIBILITY:1",
3 "productRefs": ["19092800045"],
4 "statuses":["ACTIVE"]
5}
Language: json
Name: variant Product (SKU) by Details - Parameter
Description:
variant Product (SKU) by Details - Parameter
Variant Products (SKU)
Retrieve variant products by paginating through the records.
Example Query:
1query QueryVariantProducts($count: Int!, $productCatalogueRef: String!, $variantPrdCursor: String) {
2 variantProducts(first: $count, catalogue: {ref: $productCatalogueRef}, after: $variantPrdCursor) {
3 edges {
4 node {
5 id
6 ref
7 name
8 product {
9 id
10 ref
11 name
12 }
13 attributes {
14 name
15 value
16 }
17 prices {
18 value
19 }
20 }
21 cursor
22 }
23 pageInfo {
24 hasNextPage
25 }
26 }
27}
Language: json
Name: variant Products (SKU) - Query
Description:
variant Products (SKU) - Query
Example Parameters:
1{
2 "productCatalogueRef": "DEFAULT:1",
3 "count": 100
4}
Language: json
Name: variant Products (SKU) - Parameter
Description:
variant Product (SKU) by Reference - Parameter
Product by Name and Reference
Retrieve a product based on a name and reference.
Example Query:
1query products {
2 products ( name: "%Nike%", ref: "%AH8050%") {
3 edges {
4 node {
5 id
6 ref
7 name
8 }
9 }
10 }
11}
Language: json
Name: Product by Name and Reference - Query
Description:
Product by Name and Reference - Query Sample
Example Parameters:
1{
2 "data": {
3 "products": {
4 "edges": [
5 {
6 "node": {
7 "id": "3b6372ac-c945-46e9-b9b3-e1c3b807c6a7",
8 "ref": "AH8050-F_1686296685026-111",
9 "name": "Nike Air Max 270"
10 }
11 },
12 {
13 "node": {
14 "id": "eba7a890-1f35-453b-86b9-8c63ad3a56e8",
15 "ref": "AH8050-F_1686296685026-110",
16 "name": "Nike Air Max 270"
17 }
18 }
19 ]
20 }
21 }
22}
Language: json
Name: Product by Name and Reference - Parameter
Description:
Product by Name and Reference - Parameter