Mapped types are dropped when combined with unions at non-trivial depth. #5998
Open
1 of 4 tasks
Labels
core
Related to codegen core/cli
help wanted
Extra attention is needed
stage/1-reproduction
A reproduction exists
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Make sure to fork this template and run
yarn generate
in the terminal.Please make sure the Codegen and plugins version under
package.json
matches yours.2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
The resolver type for a type that contains a type that contains a union of types that are mapped, drops knowledge of the mapped type.
That a mouthful, but here is a minimal reproduction:
To Reproduce
LIve Code Sandbox: https://codesandbox.io/s/inspiring-shape-ts0t5
My GraphQL operations:
N/A
My
codegen.yml
config file:Expected behavior
The resolver type should be:
FeedConnection:ResolverTypeWrapper<Omit<FeedConnection, 'edge'> & { node?: Maybe<ResolversTypes['FeedEdge']> }>;
But the generated type is:
FeedConnection: ResolverTypeWrapper<FeedConnection>;
The text was updated successfully, but these errors were encountered: