Is it possible to use an argument other than skus with the GET_PRODUCT_DATA query in Catalog Service on EDS Storefront? | Community
Skip to main content
Level 4
May 30, 2025
Solved

Is it possible to use an argument other than skus with the GET_PRODUCT_DATA query in Catalog Service on EDS Storefront?

  • May 30, 2025
  • 2 replies
  • 525 views

Hi Adobe Community,

In my Storefront implementation, I see that the GET_PRODUCT_DATA GraphQL query for Catalog Service is defined as follows:

 

query GET_PRODUCT_DATA($skus: [String]) {
 products(skus: $skus) {
 ...ProductFragment
 }

}

 

Is it possible to use a different argument (urlKey) instead of skus to fetch product data? If not, what is the recommended approach to support product lookups by other identifiers—should I implement a proxy or is there a built-in way to extend the query?

 

Thank you for your help!

Best answer by olsalas711

hi @kautuk_sahni ,

In my project it worked as follow:

query productSearch($urlKey: String!) { productSearch( phrase: "" filter: {attribute: "url_key", eq: $urlKey} ) { total_count items { product { sku } } } }

 

2 replies

TarunKumar
Community Advisor
Community Advisor
May 30, 2025

HI @olsalas711 ,

Magento’s GraphQL API does not accept urlKey (or other identifiers) as a top-level argument like skus, but it does support filter parameters in the products query.

query GET_PRODUCT_BY_URLKEY($urlKey: String!) {
products(filter: { url_key: { eq: $urlKey } }) {
items {
...ProductFragment
}
}
}

 

 

-Tarun

Level 4
May 30, 2025

Hi @tarunkumar ,

 

Thanks for your response.

 

Just to confirm—does the same apply to the Catalog Service as well, for example in productSearch?

 

Best regards,

Oscar

kautuk_sahni
Community Manager
Community Manager
June 23, 2025

@olsalas711 Did you find the suggestion helpful? If you need more information, please let us know. If a response resolved your issue, kindly mark it as correct to help others in the future. Alternatively, if you discovered a solution on your own, we'd appreciate it if you could share it with the community. Thank you.

Kautuk Sahni
olsalas711AuthorAccepted solution
Level 4
July 9, 2025

hi @kautuk_sahni ,

In my project it worked as follow:

query productSearch($urlKey: String!) { productSearch( phrase: "" filter: {attribute: "url_key", eq: $urlKey} ) { total_count items { product { sku } } } }