-
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
fix: support for graphql-ruby v1.13 #147
Conversation
@1060ki Thanks so much for the PR! Could you add more details in the description for why the changes are needed here (also if you could what changed in graphql-ruby to require) |
@Austio Thanks for the reply.I have added the description. |
47ac5bc
to
ff1630b
Compare
Hi @1060ki thanks for the PR to upgrade this to 1.13 and taking a while to respond. I have a PR that works on bringing this library up to That way, I can focus more on doing yak shaving, removing the blockers that make it harder to ship the upgrade. I'll leave a few notes in the code review. |
@@ -9,8 +9,8 @@ def add_directive(name:, arguments: nil) | |||
@federation_directives << { name: name, arguments: arguments } | |||
end | |||
|
|||
def to_graphql | |||
field_defn = super # Returns a GraphQL::Field | |||
def to_graphql(**args) |
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.
Thanks for linking to this. I know the tests were failing but that was in the 1.9.x test suite We removed support for 1.9.x and now tests can pass without adding args.
But the key question IMO is what are the args for? From reading the commit It seems like args were actually added to support passing silence_deprecation_warnings: true
to to_graphql
.
- Should we be using
to_graphql(**args, **kwargs)
? This captures both positional and keyword args to the function? - With our library patching
to_graphql
, does the silencing of args still work as expected?
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.
Some other considerations
- We need to run the appraisal suite for GraphQL 1.13. See this change
- Spec that should fail if you run the 1.13.x test suite.
I can ship those to main. That's a todo for myself.Done on chore: Upstream spec from GraphQL 1.13 branch #172
Hi @1060ki , I'd like to get the GraphQL 1.13 support out earlier, will be merging your commit into my branch. Happy Friday! |
* Stop using the legacy graphql_definition method * Add GraphQL 1.1.3 to the appraisal matrix * Reconcile gemfiles with main * support for graphql-ruby v1.13 (#147) * GraphQL Ruby deals with arity, we don't have to pass args Co-authored-by: Tomoki Ichikawa <[email protected]>
The following error occurs since graphql-ruby v1.13.1.
This is because
to_graphql
is passed parameter argument.ref: rmosolgo/graphql-ruby@f449669
So I also fixed
to_graphql
of ApolloFederation::HasDirectives so that it can accept any parameter argument.