You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated Dart class has the following fields:
final String id;
final Query$HomePageTournaments$tournaments$first_prize? first_prize;
final Query$HomePageTournaments$tournaments$second_prize? second_prize;
final Query$HomePageTournaments$tournaments$third_prize? third_prize;
final Query$HomePageTournaments$tournaments$fourth_prize? fourth_prize;
In other words, the generated classes count should be the same as the types count in the schema. Query$HomePageTournaments$tournaments$first_prize and Query$HomePageTournaments$tournaments$second_prize are the same thing.
Am I missing something or this is by design? Thanks in advance :)
The text was updated successfully, but these errors were encountered:
👋 @SharbelOkzan
Thank you for raising an issue. I will investigate the issue and get back to you as soon as possible.
Please make sure you have provided enough context.
This library is created and maintained by me, @budde377. Please consider supporting my work and ensure our survival by donating here.
Thanks for raising this @SharbelOkzan. This is by design the subclasses are not optimised based on the type they are on or the field they select. If you want a single type for each of these, you can define a fragment
fragmentPrizeonPrize {
amountcurrency
}
And then spread this in the sub selections
first_price { ...Prize }
...
This will generate a common dart type for each prize.
A type in my schema looks like this
And the query is
The generated Dart class has the following fields:
While what's desired is
In other words, the generated classes count should be the same as the types count in the schema.
Query$HomePageTournaments$tournaments$first_prize
andQuery$HomePageTournaments$tournaments$second_prize
are the same thing.Am I missing something or this is by design? Thanks in advance :)
The text was updated successfully, but these errors were encountered: