https://github.com/moltar/projen-graphql-codegen
https://github.com/moltar/projen-graphql-codegen
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/moltar/projen-graphql-codegen
- Owner: moltar
- License: apache-2.0
- Created: 2022-02-14T03:52:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-14T11:01:59.000Z (over 4 years ago)
- Last Synced: 2025-10-26T22:07:54.285Z (10 months ago)
- Language: TypeScript
- Size: 372 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📦 `projen-graphql-codegen`
> Projen project type for [GraphQL Code Generator](https://github.com/dotansimha/graphql-code-generator).
## Usage
```ts
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:
```sh
## build (codegen) your schema
projen build
## build & watch
projen watch
```