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: Support Interfaces #27

Merged
merged 7 commits into from
Oct 22, 2019
Merged

feat: Support Interfaces #27

merged 7 commits into from
Oct 22, 2019

Conversation

rtymchyk
Copy link
Contributor

@rtymchyk rtymchyk commented Sep 18, 2019

Following the spec defined in: https://www.apollographql.com/docs/apollo-server/federation/federation-spec/

Notes:
directive @extends on OBJECT | INTERFACE
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE

-> Introduce a new ApolloFederation::Interface module that can be included in base interface modules, using the API outlined in https://graphql-ruby.org/type_definitions/interfaces#definition-methods

union _Entity
Unions cannot reference interface types, so the resolver excludes non-object types to generate this field.

@rtymchyk rtymchyk changed the title Support Interfaces feat: Support Interfaces Sep 18, 2019
@@ -29,7 +29,7 @@ def to_graphql
end

possible_entities = orig_defn.types.values.select do |type|
!type.introspection? && !type.default_scalar? &&
!type.introspection? && !type.default_scalar? && type.is_a?(GraphQL::ObjectType) &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rtymchyk
Copy link
Contributor Author

rtymchyk commented Oct 4, 2019

I've added tests, this should be ready to go. @rylanc @grxy

@rylanc
Copy link
Contributor

rylanc commented Oct 18, 2019

Sorry for the delay. I've been out on parental leave for the last few weeks. I'll take a look at this next week.

@rtymchyk
Copy link
Contributor Author

Thank you for the update 🙂

@rylanc rylanc self-requested a review October 21, 2019 21:57
README.md Outdated Show resolved Hide resolved
Roman Tymchyk and others added 2 commits October 21, 2019 18:45
Copy link
Contributor

@rylanc rylanc 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 implementing this!

@rylanc rylanc merged commit 33d0097 into Gusto:master Oct 22, 2019
rylanc pushed a commit that referenced this pull request Oct 22, 2019
# [0.5.0](v0.4.2...v0.5.0) (2019-10-22)

### Features

* Support Interfaces ([#27](#27)) ([33d0097](33d0097))
@rylanc
Copy link
Contributor

rylanc commented Oct 22, 2019

🎉 This PR is included in version 0.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants