elide
elide copied to clipboard
Add GraphQL inheritance/interface support
Description
JSON-API supports model inheritance because it is not strongly typed. This PR enabled GraphQL to support model inheritance through GraphQL interfaces.
The PR also fixes scenarios where client errors were causing the Elide server to return 500 errors.
Motivation and Context
This PR allows the GraphQL API to request subclass fields through inline fragments like:
{ character
{ edges
{ node
{
__typename ... on Character { name }
__typename ... on Droid { primaryFunction }
}
}
}
}
The following features are not supported:
- Filtering a super class collection on sub class fields.
- Sorting a super class collection on sub class fields.
How Has This Been Tested?
New IT tests in InheritanceIT
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.