validate_graphql_codeblocks
Validates GraphQL code blocks against the Storefront schema and flags runtime pitfalls like invalid cart IDs before queries reach the browser.
Instructions
Check GraphQL against the Storefront schema before it reaches a browser.
Always run generated queries and mutations through this. The schema is large and has many close names, and an invented field looks entirely plausible until it fails.
Beyond schema validity it flags mistakes that validate cleanly and still fail at runtime, such as a numeric cart id or reading delivery before the cart has an address, and it answers names borrowed from other storefront APIs with the CloudCart one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api | No | Which schema to validate against. | storefront |
| codeblocks | Yes | The code blocks to check. | |
| conversationId | Yes | From learn_cloudcart_storefront. |