-
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
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.
ahey
Metadata
Metadata
Assignees
Labels
No labels