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
Which is not valid C#. Reordering the parameters would be a breaking change.
I think the problem described above is the primary use case for this particular feature, however scalar defaults are also possible.
My preference for a first cut of this feature would be to:
Only support default arguments for reference types.
Only support default arguments when verbatim transpilation generates valid C#, i.e. not ($x = null, $y).
When default arguments are detected that do not meet the above criteria a warning should be emitted. There should be a setting in .graphqlrc.json to disable these warnings, by default these warnings should be emitted.
Product
Strawberry Shake
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is your feature request related to a problem?
Sort and Filter inputs generated by Hot Chocolate are nullable by default, so for example the following C# code
Will generate the following graphql schema
I can then define the following query in Strawberry Shake
Currently it ignores the argument defaults in the generated code and generates
The solution you'd like
I would like Strawberry Shake to generate the following code
In the slack discussion it was noted by Pascal that
Is also valid graphql, but verbatim transpiling to C# would generate
Which is not valid C#. Reordering the parameters would be a breaking change.
I think the problem described above is the primary use case for this particular feature, however scalar defaults are also possible.
My preference for a first cut of this feature would be to:
When default arguments are detected that do not meet the above criteria a warning should be emitted. There should be a setting in
.graphqlrc.json
to disable these warnings, by default these warnings should be emitted.Product
Strawberry Shake
The text was updated successfully, but these errors were encountered: