Core Issue:
Developers encounter “Field doesn’t exist on type” errors when querying Shopify’s GraphQL Storefront API, despite fields appearing in documentation. Common problematic fields include product, bodyHtml, priceRangeV2, and image dimensions (width, height).
Root Causes Identified:
API Version Mismatch: Fields may not exist in the API version being used
Wrong Identifier: Using id instead of product_id (or vice versa)
Inline Fragments Required: Storefront API queries need inline fragment syntax when using node() queries:
node(id: "...") {
...on Product {
title
}
}
Query vs Mutation Confusion: Some operations require explicit mutation declaration
Current Status:
Multiple users report Shopify’s official documentation examples don’t work as written. The thread remains open with partial solutions but no comprehensive resolution for all reported field errors.
Summarized with AI on November 1.
AI used: claude-sonnet-4-5-20250929.
Im new to GraphQL and this example only sure a basic example which is great. Sadly they have not provided an example of a product show page; how to fetch a single product.
Using GraphiQL:
{
product(id: "gid://shopify/Product/1245678") {
title
description
onlineStoreUrl
}
}
I seem to get the data. I, getting an error ““GraphQL error: Field ‘product’ doesn’t exist on type ‘QueryRoot’” which is wrong because “product” in on the QueryRoot”.
My actual code:
const query = gql`
query {
product(id: "gid://shopify/Product/4416592838700") {
title
description
onlineStoreUrl
}
}
`;
// Then later:
graphql(query),
[...]
Is anyone looking at this? The example is hidden important things such as the “bodyHtml” and fetch a single product. They having not included that query as it does not work. How do you mean: “GraphQL error: Field ‘bodyHtml’ doesn’t exist on type ‘Product’” when it is there? Could a member of staff please advice???