Open rosscooperman opened 1 year ago
Thanks for working on this! Did you see this other PR where we're also talking about entity interface support? How do you feel about collaborating on that PR instead, since it's further along?
Sounds good to me!
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
.