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
Describe the bug
The change made for #3882 is counter-intuitive to me and seems like a bug. By my understanding, a Field definition includes whether its an array or not.
Then I'd expect this wrapper to be applied to the Type of the field
// a type like this
images: Array<GqlImageData>;// turns into
images: FieldWrapper<Array<GqlImageData>>;
However as mentioned, the above change means that Arrays cannot be given a custom wrapper. The result of using the config returns
images: Array<FieldWrapper<GqlImageData>>;
Is this a bug or a feature request? As alluded to in the example config, it would simplify code a lot if a custom field wrapper enabled resolver functions for fields (I've read #1704 - however moving to partials removes type strictness which is useful to developers in the team).
Thanks
The text was updated successfully, but these errors were encountered:
I hit the same issue as I use the same fieldWrapperValue. Added a few comments in #3882 about it. In my case I get the error Type '() => Promise<User[]>' is missing the following properties from type 'FieldWrapper<User>[]': pop, push, concat, join, and 27 more.
Describe the bug
The change made for #3882 is counter-intuitive to me and seems like a bug. By my understanding, a Field definition includes whether its an array or not.
Based on this change, when adding to
config
:Then I'd expect this wrapper to be applied to the Type of the field
However as mentioned, the above change means that Arrays cannot be given a custom wrapper. The result of using the config returns
Is this a bug or a feature request? As alluded to in the example config, it would simplify code a lot if a custom field wrapper enabled resolver functions for fields (I've read #1704 - however moving to partials removes type strictness which is useful to developers in the team).
Thanks
The text was updated successfully, but these errors were encountered: