FieldWrapper not applied to fields in union resolver type #5776
Labels
core
Related to codegen core/cli
help wanted
Extra attention is needed
stage/1-reproduction
A reproduction exists
Hi! First thanks to @dotansimha for his great effort on this project!
Describe the bug
I've run into a bit of an issue with a circular type definition in a union field, a custom field wrapper and the
typescript-resolvers
plugin. I would expect theparent
field in the example below to be wrapped withFieldWrapper
like it is the original type. As I'm using the same resolver(that looks like myFieldWrapper
type) for two separate generated types, this currently results in a type error when using the generatedResolverTypes
directly. A workaround is to override theComment
type with a mapper.To Reproduce
Repo: https://codesandbox.io/s/exciting-bhaskara-s9qze
Steps to reproduce the behavior:
# No operations
codegen.yml
config file:Expected behavior
A field that does get resolved to another resolver type should also be wrapped with the custom field wrapper.
I would expect this
as opposed to the original:
Environment:
Additional context
The text was updated successfully, but these errors were encountered: