Preset generator from GraphQL operations to Typescript code for the
@graphql-codegen
Statements | Branches | Functions | Lines |
---|---|---|---|
Create codegen.ts
file in your project root directory and add the following
code
with your own source paths:
// codegen.ts
import { SplitEnumsConfigurator } from '@wezom/graphql-codegen-configurator';
const configurator = new SplitEnumsConfigurator({
schema: 'src/gql/schema.graphql',
outputDir: './src/gql/__generated__',
documents: ['src/**/*.tsx', 'src/**/*.ts'],
});
export default configurator.create();