Skip to content
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

feat: Add entity interface support #265

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rosscooperman
Copy link

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):

  1. Support 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 the ApolloFederation::Interface module.
  2. Will need to support resolve_type on the interface as opposed to the schema. Need to look into whether there's a consistent way in graphql-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 through Schema.resolve_type.
  3. Tests.

@rosscooperman rosscooperman changed the title Add entity interface support feat: Add entity interface support Oct 6, 2023
Copy link
Contributor

@slauppy slauppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@rosscooperman
Copy link
Author

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!

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