Error getting graphql RunInput in graphQL preview

Topic summary

• Issue: Querying runInput/cart in GraphQL preview returns “Field ‘cart’ doesn’t exist on type ‘QueryRoot’.” The user wants to view handles or similar info for delivery options.

• Cause: Shopify’s GraphQL App/Explorer only exposes Admin or Storefront API schemas. The runInput (including cart) is part of the Shopify Functions input schema and isn’t queryable via QueryRoot in the Explorer, so the query is invalid.

• Implication: You cannot inspect Shopify Function runInput (e.g., cart) through the GraphQL Explorer. That data is only available within the function execution context.

• Possible direction: To inspect delivery option details, either:

  • Log/inspect data within the Shopify Function runtime, or
  • Use the appropriate Admin/Storefront APIs that expose delivery/cart data (not via Function input in Explorer).

• Attachments: A screenshot shows the GraphQL error.

• Status: Explanation provided; no direct workaround in Explorer. Further steps require testing within the Function or using the correct APIs.

Summarized with AI on December 22. AI used: gpt-5.

I’m getting an error while I am trying to see the information that I am getting from the runInput of “Field ‘cart’ doesn’t exist on type ‘QueryRoot’”. How do I fix this? Or is there another way to look at the handle or similar information of delivery options in general?

Hi there

Shopify GraphQL App or Explorer only available for admin or storefront API,

but now you use the Shopify Function input which is not valid