dotansimha / dotansimha/graphql-code-generator
The code generator does not take into account naming conflicts
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Which packages are impacted by your issue?
@graphql-codegen/cli, @graphql-codegen/typescript-operations
### Describe the bug
There are some examples :
type VenuePlan { groundPeriods(ground: ID!):[VenuePeriod!]! }
type VenuePlanGround { Periods(date: Time!):[VenuePeriod!]! }
and when i run code generating in front-end side, there is the error:


### Your Example Website or App
none
### Steps to Reproduce the Bug or Issue
when run graphql-codegen to produce code, it has produced the same name type.
### Expected behavior
The code generator needs to take into account naming conflicts
### Screenshots or Videos


### Platform
"@graphql-codegen/cli": "^1.21.5",
"@graphql-codegen/schema-ast": "^1.18.3",
"@graphql-codegen/typescript": "^1.22.1",
"@graphql-codegen/typescript-graphql-request": "^3.2.1",
"@graphql-codegen/typescript-operations": "^1.18.0",
### Codegen Config File
generates:
./scripts/api/integration.ts:
documents: './operations/documents/integration/*.graphql'
schema: ./operations/schema/integration.graphql
plugins:
- typescript
- typescript-operations
- typescript-graphql-request
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.