Shipping Discount Extension Query Input

Topic summary

A user is experiencing an error when attempting to query ‘cart’ and ‘discountNode’ fields within Shopify’s Discounts and Shipping Function using GraphQL.

Error Details:

  • Error message: “Cannot query field ‘cart’ on type ‘QueryRoot’”
  • Context: Working with Shopify’s discount/shipping extension functionality
  • A screenshot was included showing the problematic GraphQL query

Current Status:

  • The issue remains unresolved
  • The user is seeking insights or solutions from the community to fix this GraphQL query error
  • No responses or solutions have been provided yet
Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

Hello Shopify Community,

I’m encountering an issue while trying to query the ‘cart’ and ‘discountNode’ within the Discounts and Shipping Function using the following GraphQL query:

Unfortunately, I am receiving the error: “Cannot query field ‘cart’ on type ‘QueryRoot’.” Can anyone provide insights or solutions to help me resolve this issue?

Thank you in advance for your assistance!

1 Like