Skip to content

How to exclude empty types when using fragments? #5567

Answered by dotansimha
gopeter asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure that homepage_homepage_Entry is the only type possible. How does entry field is defined?
Basically, codegen tried to reflect the whole possible response from the server, based on the schema. If there is a need for a fragment - it means that you might have interface/union, and your schema might return other types as well.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@dotansimha
Comment options

@gopeter
Comment options

@dotansimha
Comment options

@gopeter
Comment options

@dotansimha
Comment options

Answer selected by dotansimha
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants