-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FieldWrapper wraps the final element instead of the overall field type #4614
Comments
This same issue is actually a further issue in the resolver map, e.g. I get the following errors
I'm not sure exactly how it should be configured, but the |
Did you figure out a way to fix this? It makes the entire FieldWrapper pointless to use for more complicated models. ie. having an @dotansimha Any input on how to use the generated code, when you have models that have Promise fields? |
I have attempted to solve this in a new PR: #5753 that adds a new configuration option target to arrays (and |
Fix is available in |
Basic example:
FieldWrapper<Maybe<Array<Maybe<Favorite>>>>
Maybe<Array<Maybe<FieldWrapper<Address>>>>
Not sure whether to call this a bug or just a missing feature, but the FieldWrapper is put inside rather than outside of the Array and Maybe wrappers.
Example:
With the config:
Given the following graphql (note I'm contriving an example, but don't usually have nullables in an array...):
I would expect the following ts:
instead I get:
As you can see, I would expect support for FieldWrapper to wrap the whole thing so I can have
Promise<T> | T
This is on version
1.17.0
The text was updated successfully, but these errors were encountered: