Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello!
I am using the Apollo Client useQuery Hook to fetch my products from the store. I wrote a query which should get me all my products with a certain product_type. However, it does not seem to work. When I pass this query to the StoreFront API playground it seems to work tough. Anyone has an idea of why that could be? This is the query I am sending:
export const GET_PROUCTS = gql`
query GetProducts {
products(first: 250, query: "product_type:'bundle'", sortKey: TITLE ) {
edges {
node {
id
description
title
totalInventory
images(first: 5) {
edges {
node {
url
}
}
}
}
}
}
}
`;
Also when I remove the tag it only returns me 14 products and not 250 as indicated.
Thank you for your support!
Solved! Go to the solution
This is an accepted solution.
Figure it out on my own -> seems like my products where only in the Shopify Playground sales channel but not in my store sale channel. So they did not appear when requesting them.
This is an accepted solution.
Figure it out on my own -> seems like my products where only in the Shopify Playground sales channel but not in my store sale channel. So they did not appear when requesting them.