Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Has the pages field been deprecated on QueryRoot? Or was it just never implemented? It's not working for me. Appreciate any answers 🙂
Hi Ryan,
Works just fine.
I noticed you write field in your question. The pages property is a connection so it isn't queried like a field.
Have you tried it like so?
query {
pages(first:10) {
edges {
node {
handle
}
}
}
}
Let me know if above works for you.
Hey Karl! Thanks for the reply. Here's what's going on in my GraphiQL tool.
{
"errors": [
{
"message": "Field 'pages' doesn't exist on type 'QueryRoot'",
"locations": [
{
"line": 2,
"column": 3
}
],
"fields": [
"query",
"pages"
]
}
]
}
Hmm... Ryan, what GraphQL endpoint are you hitting? Shopify has 2, the Storefront and the Admin. You may be trying to query the wrong one.
Karl, you're right, the GraphiQL tool in my App section is hooked up to the Admin API oops, lol.