-
-
Save liamgriffin/9a705fdeffff2cefdb1985d209b7eff0 to your computer and use it in GitHub Desktop.
Example of how to configure the generator for codegen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <root>/codegen.ts | |
import type {CodegenConfig} from '@graphql-codegen/cli'; | |
import {preset, pluckConfig, schema} from '@shopify/hydrogen-codegen'; | |
export default <CodegenConfig>{ | |
overwrite: true, | |
pluckConfig, | |
generates: { | |
['storefrontapi.d.ts']: { | |
schema, | |
preset, | |
documents: ['app/**/*.{ts,tsx}', 'server.ts'], | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment