hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

Read Codegen config from GraphQL config file

Open frandiox opened this issue 1 year ago • 1 comments

We currently allow having a <root>/codegen.ts file with custom codegen config. However, it is common in the community placing this config in <root>/.graphlrc.js instead.

This convention makes it easier to add new GraphQL projects, such as Admin API or a custom CMS.

Example of a .graphqlrc.ts that uses our Codegen internally (within @shopify/api-codegen-preset): https://github.com/Shopify/shopify-app-template-remix/blob/main/.graphqlrc.ts


I'm also changing the GraphQL config file format in the skeleton template to TS instead of YAML, since this makes it easier to add new projects for Codegen.

frandiox avatar Jul 10 '24 04:07 frandiox

Oxygen deployed a preview of your fd-grahqlrc-codegen branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
classic-remix ✅ Successful (Logs) Preview deployment Inspect deployment July 10, 2024 4:57 AM
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment July 10, 2024 4:57 AM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment July 10, 2024 4:57 AM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment July 10, 2024 4:57 AM
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment July 10, 2024 4:57 AM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment July 10, 2024 4:57 AM

Learn more about Hydrogen's GitHub integration.

shopify[bot] avatar Jul 10 '24 04:07 shopify[bot]