Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental codegen support to CLI (#707)
* Infer return and variable types from query string argument * Make arguments optional if variables are not required * Force optional arguments when not using codegen * Ignore country and language when checking optional arguments * New @shopify/hydrogen-codegen package * Add vendor patch for graphql-tag-pluck * Remove unused deps and add comments * Add codegen to hello-world template * Remove codegen from generated JS templates * Use Pick instead of primitives for generated operations * Remove unnecessary properties in package.json * Add comments and rename some generics * Simplify storefront types for codegen * Add createRequire in ESM build * Fix typecheck * Disable tests for now * Prettier readme * Use any by default for the return type * Adjust new lines and exports * Check custom plugins and export hydrogen plugin * wip * Update visitor implementation * Make fragment and query names unique in demo-store * Change namespace and import path * Better separate plugin from preset * Log error * Fix generated code order * Separate preset from utilities * Reorganize files * Fix ESM build * Use JSON schema from Hydrogen package * Specify extensions in imports and fix CJS build * Change graphql-tag-pluck patching strategy * Add experimental-codegen command * Add codegen to dev command with a flag * Fix config path flag in dev command * Generate Oclif manifest * Remove files from templates * Fix pluck paths during tests * Add unit tests * Fix deps * Fix clean-all, update package-lock * Wrap require.resolve in try-catch * Make schema accessible without building Hydrogen first * Patch pluck before importing codegen cli * Cleanup * Improve error messages * Feedback update * Fix tests * Update package.json and make package publishable * Update flag descriptions * Changesets and docs * Change default generated file name * Fix paths on Windows
- Loading branch information
@frandiox Do we really need to commit this file?