-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
From #266 (comment)
Thanks for the fix above! I created another repo here for a related bug where the mapper for the interface type itself isn't being set properly as the Resolver return type.
The way I was anticipating it would work is that (based on the example in the linked repo):
- The user query returns a User interface type. It should expect the return value of the UserMapper
- The __resolveType on User.ts should have the UserMapper as the parent type, and can be used to dictate which of the implementing types is being returned
- The parent for AdminUser type resolver functions should be the AdminMapper (and similar for CustomerMapper). If they are not defined then it should default to UserMapper as the parent type.
Please let me know if I'm thinking about this the wrong way! The reason I would like these types is that I have a base table in my DB that maps cleanly to the interface type, but we need to fetch additional data to resolve fields on the actual object type.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels