Duplicate identifier error
See original GitHub issueDescribe the bug Duplicate resolver type is generated.
To Reproduce
- Define field
category_sports: category
as schema. (single underscore) - Define another field
category__sports: [category]
as schema. (double underscore) - Run the following command:
gql-gen -s http://somewhere/graphql -t graphql-codegen-typescript-template -o ./src/resolvers/types.ts ./src/resolvers/query.ts
- Run the following command:
tsc -p .
src/resolvers/types.ts - error TS2300: Duplicate identifier ‘CategorySportsResolver’.
Expected behavior No error message.
Environment:
- OS: macOS High Sierra
- Codegen: graphql-code-generator v0.12.5, graphql-codegen-typescript-template@0.12.5
- Node: v8.12.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Confusing "duplicate identifier" Typescript error message
When I ran npm start , I got a bunch of duplicate identifier errors. SOLUTION: From the project root folder run: rm -r...
Read more >Duplicate identifier error in TypeScript | bobbyhadz
Another common cause of the "Duplicate identifier error" error is - your project is pulling in typings from multiple versions of a package....
Read more >How to fix the "duplicate identifier" error in TypeScript
If the answer to the previous question is yes, then you just found the reason to the “duplicate identifier” error. Remove the lines...
Read more >How to fix: Duplicate identifier - Google Merchant Center Help
How to fix: Duplicate identifier · Step 1: See the affected products · Step 2: Remove the duplicate · Step 3: Resubmit your...
Read more >Troubleshooting duplicate or missing identifier error messages
Learn about duplicate identifier errors and how to resolve them in your list uploads. If you're encountering a different error message, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dotansimha @danbruegge, Faced the same problem.
It happens because
"pluginCreator___id"
and"pluginCreatorId"
usingchange-case#pascalCase
is transformed into the samePluginCreatorId
.Changing the enum transformer name convention to
keep
solved the problem:Hi, looks like this error is back again? We have a simple GatsbyJS+StrapiJS stack.
This is what i get:
Do you need further infos?