dotansimha / dotansimha/graphql-code-generator-community
Typed schema generated with typescript-urql-graphcache plugin doesn't preserve typesPrefix case
- Dominant language
- TypeScript
- Stars
- 137
- Forks
- 195
- Avg merge
- 6h 20m
- Merged PRs (30d)
- 16
Description
**Describe the bug**
Typed schema generated with `typescript-urql-graphcache` plugin doesn't preserve `typesPrefix` case (e.g. 'GQL' -> becomes 'Gql'):
**To Reproduce**
Steps to reproduce the behavior:
1) The `codegen.yml` file:
```yaml
overwrite: true
schema: 'http://localhost:3000/graphql'
documents: 'src/graphql/**/*.graphql'
generates:
src/generated/graphql.tsx:
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-urql'
- 'typescript-urql-graphcache'
config:
typesPrefix: GQL
```
2) Run `graphql-codegen --config codegen.yml`
3) Results:
generated type:
```
export type GQLRating = {
__typename?: 'Rating';
id: Scalars['ID'];
...
};
```
Generated schema:
```
Rating?: {
id?: GraphCacheResolver,
...
}
```
**Expected behavior**
`typePrefix` case should be preserved in the generated schema:
```
Rating?: {
id?: GraphCacheResolver,
...
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.