A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hey there,
I got this error:
syntax error, unexpected STRING (\", \")
after I use the following query:
query ProductsQuery($cursor: String) { products(first: 1000, after: $cursor) { edges { node { __typename id variants { edges { node { __typename id ... on ProductVariant { inventoryQuantity inventoryPolicy inventoryManagement inventoryItem { id requiresShipping tracked inventoryLevels { edges { node { id location { id } quantities(names: ["available", "on_hand", "reserved", "committed"]) { name quantity } } } } } } } } } } } pageInfo { hasNextPage endCursor } } }
I am a beginner in GraphQL and I tried to find all the available solutions, but nothing worked successfully.
If I remove:
quantities(names: ["available", "on_hand", "reserved", "committed"]) { name quantity }
The query will run normally, but I need the quantities for my tasks. Can anybody please help me with this error?
And I'm sorry if the way that I asked doesn't satisfy you.
Thank you.
Hi Alinh1803,
The `inventoryManagement` field on ProductVariant is deprecated - if you remove this, is it working?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog