Skip to content

moltar/projen-graphql-codegen

Repository files navigation

📦 projen-graphql-codegen

Projen project type for GraphQL Code Generator.

Usage

const projen = new ProjenGraphQLCodegenProject({
  // ... required projen options

  // projen-graphql-codegen options
  schema: 'my-schema.graphql',
  eslintGraphQLConfig: 'schema-recommended',
  generators: {
    './src/types.ts': {
      plugins: ['typescript'],
      config: {
        avoidOptionals: true,
      },
    },
  },
});

// add more generators later
projen.addGenerator('./src/foo.ts', {
  plugins: ['typescript'],
})

// finally synth the project
projen.synth()

Then:

## build (codegen) your schema
projen build

## build & watch
projen watch

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published