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
When I create a schema.graphql containing a non-null query argument that has a default value, I would expect to not have to pass that argument to the query.
Current Behavior
The type system gives me an error, asking me to add the query argument.
...
exporttypeValueTypes={['Row']: AliasType<{id?: boolean| `@${string}`,__typename?: boolean| `@${string}`
}>;['Query']: AliasType<{// Here I would expect "limit" to be optional, because the default value is "10".rows?: [{limit: number|Variable<any,string>},ValueTypes['Row']],__typename?: boolean| `@${string}`
}>}
...
Additional information
Node.js version 18.17.1.
graphql-zeus version 5.3.1.
graphql version 16.8.0.
@apollo/client version 3.8.3.
Typescript version 5.1.6.
using typedDocumentNode for the Apollo client in Angular.
Expected Behavior
When I create a schema.graphql containing a non-null query argument that has a default value, I would expect to not have to pass that argument to the query.
Current Behavior
The type system gives me an error, asking me to add the query argument.
Possible Solution
The generation logic should treat non-null query arguments with a default value the same as if they were optional.
Relevant part of the spec: https://spec.graphql.org/October2021/#sec-Required-Arguments
Steps to Reproduce
schema.graphql
like this:npx [email protected] schema.graphql --typedDocumentNode
zeus/index.ts
:Additional information
18.17.1
.5.3.1
.16.8.0
.3.8.3
.5.1.6
.typedDocumentNode
for the Apollo client in Angular.References
The text was updated successfully, but these errors were encountered: