hydrogen codegencommand
command
Automatically generates GraphQL types for your project’s Storefront API queries.
Anchor to flagsFlags
The following flags are available for the hydrogen codegen
command:
- Anchor to --codegen-config-path <value>--codegen-config-path <value>string
Specify a path to a codegen configuration file. Defaults to
<root>/codegen.ts
if it exists.- Anchor to --path <value>--path <value>stringenv: SHOPIFY_HYDROGEN_FLAG_PATH
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
- Anchor to --watch--watch
Watch the project for changes to update types on file save.
hydrogencodegen
- --codegen-config-path <value>
Specify a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if it exists.
string
- --path <value>
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
string
- --watch
Watch the project for changes to update types on file save.
""
export interface hydrogencodegen {
/**
* Specify a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if it exists.
*
*/
'--codegen-config-path <value>'?: string
/**
* The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
* @environment SHOPIFY_HYDROGEN_FLAG_PATH
*/
'--path <value>'?: string
/**
* Watch the project for changes to update types on file save.
*
*/
'--watch'?: ''
}
Was this section helpful?
Hydrogen codegen
shopify hydrogen codegen [flags]
examples
hydrogen codegen
hydrogen codegen
shopify hydrogen codegen [flags]