Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Generated ResolversTypes invalid when using mappers for interface types #1670
When specifying mappers for implementations of an interface where one of the fields is referring to another mapped type, the generated resolver type consists of a union with fields of the graphql type, instead of those from the typescript interface.
I've created a (trivial) sample project where the invalid generated types are visible:
When you look at resolver-types.ts#L108, you'll see that the omit of the
Also when you looks at resolvers.ts#L43, you'll see that the
What a solution could be (and what I currently have applied by using patch-package), is to not apply the omit logic when the interface type has a mapper specified.