Skip to content

Enhance type mapping in union #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2018
Merged

Enhance type mapping in union #140

merged 1 commit into from
May 20, 2018

Conversation

visualage
Copy link
Contributor

This is an attempt to solve #139.

The idea here is, user can register a parent class or an interface in the GraphQL. When the union looks up the corresponding GraphQL type, it would try to resolve the type by the instance type, and then walk up the class hierarchy. If still cannot find any mapped GraphQL type, it would try to look at all implemented interfaces and their mapped GraphQL type.

This would allow mapping abstract class or interface to GraphQL types, and returning actual concrete classes in the union.
@apottere apottere merged commit ca6eee9 into graphql-java-kickstart:master May 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants