-
Notifications
You must be signed in to change notification settings - Fork 79
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: Get Apollo Federation to work with GraphQL 1.13.x #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial self review
@@ -9,7 +9,7 @@ def add_directive(name:, arguments: nil) | |||
@federation_directives << { name: name, arguments: arguments } | |||
end | |||
|
|||
def to_graphql | |||
def to_graphql(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self note: Check out the definition change in #to_graphql
and how this method is used
gemfiles/graphql_1.13.gemfile.lock
Outdated
ruby-debug-ide | ||
|
||
BUNDLED WITH | ||
2.1.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use bundler 2.3.x
@@ -408,75 +406,64 @@ def self.visible?(context) | |||
) | |||
end | |||
|
|||
context 'with a filter' do | |||
context 'context in schema generation' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test broke in 1.13.x, because there's a new validation in GraphQL Ruby that warns against having an empty schema, but we were asserting that "Field '_service' doesn't exist on type 'Query'".
After looking at the original PR that introduced this, I think the intent is to make sure that Schema.federation_sdl
respects context and uses it generation.
See https://graphql-ruby.org/authorization/visibility.html
I struggled with fixing it trying to get the right indirect error message across different GraphQL versions. Also, I think schema level filters are deprecated? I can't find docs on it anymore on graphql-ruby.
So with that, I rewrote the test to basically assert that we're using the context in SDL generation. Further improvements welcome.
e5ea346
to
4dd85f8
Compare
4dd85f8
to
fc150fe
Compare
db343aa
to
94ab540
Compare
a631cc5
to
5b8e807
Compare
Gemfile.lock
Outdated
@@ -42,7 +42,7 @@ GEM | |||
debase-ruby_core_source (0.10.9) | |||
diff-lcs (1.3) | |||
erubi (1.9.0) | |||
google-protobuf (3.19.3-x86_64-linux) | |||
google-protobuf (3.19.3-x86_64-darwin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🎉 This PR is included in version 2.2.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This is a PR to gauge the effort to get the library working with GraphQL 1.13.
The flow and tasks:
Fix semantic release issue that keeps changing google-protobuf to a platform specific version Semantic release bot changes our Gemfile.lock #169This is a monster on its own :([ ] Release new major version of the gem(there's no breaking changes, in fact no code changes, so we should be good to release a minor version)