feat: Add entity interface support #265
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a super minimal implementation of support for interfaces as entities. Really just enough to get our
@interfaceObject
+@key
on interface setup working.I don't expect this is anywhere near ready to merge but was hoping to get some feedback on the approach before I go further. Some things I know I will need to do (but didn't need for our specific purposes):
underscore_reference_keys
on interfaces. We don't happen to use it so I just guarded against calling it if it's not there but will need to add support to theApolloFederation::Interface
module.resolve_type
on the interface as opposed to the schema. Need to look into whether there's a consistent way ingraphql-ruby
to resolve an interface type that will have the framework check all relevant options -- probably is, just didn't look closely because we resolve all of our interface types throughSchema.resolve_type
.