I have the following query:
query GetQuotesDates($daysToReturn: Int!) {
getQuoteDates(daysToReturn: $daysToReturn) {
value,
}
}
Which I am using as:
final result = await graphqlClient.queryGetQuotesDates(
OptionsQueryGetQuotesDates(
variables: VariablesQueryGetQuotesDates(
daysToReturn: daysToReturn,
),
),
);
I understand that OptionsQueryGetQuotesDates has many optional items to configure the query, but I feel that it would be a lot better if the generated code allowed me to do this instead:
final result = await graphqlClient.queryGetQuotesDates(daysToReturn: daysToReturn);
Thus, all the fields inside OptionsQueryGetQuotesDates would be generated inside queryGetQuotesDates as optional named parameters instead, collapsing queryGetQuotesDates, OptionsQueryGetQuotesDates, and VariablesQueryGetQuotesDates as one inside queryGetQuotesDates.
This approach seems more aligned with the purpose of the package, which is to avoid us from writing boilerplate code.
I have the following query:
Which I am using as:
I understand that
OptionsQueryGetQuotesDateshas many optional items to configure the query, but I feel that it would be a lot better if the generated code allowed me to do this instead:Thus, all the fields inside
OptionsQueryGetQuotesDateswould be generated insidequeryGetQuotesDatesas optional named parameters instead, collapsingqueryGetQuotesDates,OptionsQueryGetQuotesDates, andVariablesQueryGetQuotesDatesas one insidequeryGetQuotesDates.This approach seems more aligned with the purpose of the package, which is to avoid us from writing boilerplate code.