Skip to main content

storefrontApiCustomScalars

Meant to be used with GraphQL CodeGen to type the Storefront API's custom scalars correctly when using TypeScript.By default, GraphQL CodeGen uses any for custom scalars; by using these definitions, GraphQL Codegen will generate the correct types for the Storefront API's custom scalars.

See more about GraphQL CodeGen and custom scalars for TypeScript.

Note that @shopify/hydrogen-react has already generated types for the Storefront API, so you may not need to setup GraphQL Codegen on your own.



Was this page helpful?