https://github.com/hyperse-io/graphql-codegen-enum
Gernated by graphql-codegen only for scalar type enum
https://github.com/hyperse-io/graphql-codegen-enum
graphql-codegen graphql-codegen-enum graphql-codegen-gql-tada graphql-codegen-scalar hyperse
Last synced: 3 months ago
JSON representation
Gernated by graphql-codegen only for scalar type enum
- Host: GitHub
- URL: https://github.com/hyperse-io/graphql-codegen-enum
- Owner: hyperse-io
- License: mit
- Created: 2024-04-26T07:59:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-16T22:43:38.000Z (10 months ago)
- Last Synced: 2024-08-16T23:41:36.927Z (10 months ago)
- Topics: graphql-codegen, graphql-codegen-enum, graphql-codegen-gql-tada, graphql-codegen-scalar, hyperse
- Language: JavaScript
- Homepage:
- Size: 1.88 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# @hyperse/graphql-codegen-enum
Gernated by graphql-codegen only for scalar type enum# Usage
1. `yarn graphql @graphql-codegen/cli @graphql-codegen/add @hyperse/graphql-codegen-enum`
2. setup codegen plugin on `codegen.cjs`
```cjs
module.exports = {
overwrite: true,
config: {
strict: true,
},
generates: {
'src/generated-types.ts': {
schema: 'http://localhost:7001/admin-api',
plugins: [
{
add: {
content: '/* eslint-disable */',
},
},
'@hyperse/graphql-codegen-enum',
],
},
},
hooks: {
afterAllFileWrite: ['prettier --write'],
},
};
```3. Define codegen `scripts`
```json
{
"scripts": {
"codegen": "graphql-codegen --config ./codegen.cjs"
}
}
```4. `yarn codegen`
## Note
This plugin normally used to `gql.tada`, it will forcely only generated all `enum` object, we assume that you don't need any other codegen typings except enum.