Generating duplicate types on fragments
See original GitHub issueIssue Description
Thank you for all the work on the v1 release! I’m experiencing duplicate types being generated when using this along with a plugin that has introspecting GraphQL like Contentful:
ERROR in /Users/fang/app/src/__generated__/gatsby-types.ts(10461,13):
10461:13 Duplicate identifier 'GatsbyContentfulSizes_withWebp_noBase64Fragment'.
10459 | export type GatsbyContentfulSizes_withWebpFragment = Pick<ContentfulSizes, 'base64' | 'aspectRatio' | 'src' | 'srcSet' | 'srcWebp' | 'srcSetWebp' | 'sizes'>;
10460 |
> 10461 | export type GatsbyContentfulSizes_withWebp_noBase64Fragment = Pick<ContentfulSizes, 'aspectRatio' | 'src' | 'srcSet' | 'srcWebp' | 'srcSetWebp' | 'sizes'>;
| ^
10462 |
10463 | export type PagesQueryQueryVariables = {};
10464 |
failed Building development bundle - 50.337s
^ This is just one example, it’s happening for all fragments. Is there a current workaround for this or will there need to be a fix? @cometkim
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
v1.15.0 generating duplicate fragment definitions · Issue #4143
Describe the bug I have a graphql directory containing a number of .graphql files containing a mix of queries, mutation and fragments.
Read more >Fragments - Apollo GraphQL Docs
A GraphQL fragment is a piece of logic that can be shared between multiple queries and mutations. ... Every fragment includes a subset...
Read more >android - How do I duplicate fragments? - Stack Overflow
The fragment has a TextView , by passing parameters to the Fragment, I want to display different text inside each TextView of the...
Read more >Duplicate Code - Refactoring.Guru
If duplicate code is found in two different classes: If the classes aren't part of a hierarchy, use Extract Superclass in order to...
Read more >4. Write Code Once - Building Maintainable Software, Java ...
To resolve duplication using Extract Method, the duplicate (or a part thereof) is extracted into a new method which is then called multiple...
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 Free
Top 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
Peeerfect, 1.1.1 is confirmed to be working. I tested on 1.0.1 which didn’t work before. Thank you for fixing this 🎉
Hey @fandy, can you test it again on v1.1.0? please try and let me know if the problem still happens