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
NoMethodError - undefined method `keyword_arguments' for #<GraphQL::ExecutionError... #4074
Comments
Thank you @rmosolgo |
👋 Would it be possible to have this fix back-ported to |
rmosolgo
added a commit
that referenced
this issue
Nov 17, 2022
Sure thing -- I just released it in 1.13.17 (via #4248)! |
Thank you so much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When a resolver-specific complexity defined as Proc, raising a GraphQL::ExecutionError produce an exception instead of response.
Versions
graphql
version: 1.13.12 but tested on 2.x and issue exists as wellrails
(or other framework): 1.13.12GraphQL schema
Sample resolver:
Steps to reproduce
Call a resolver with a query passing id as filtering criteria, but give no id:
Expected behavior
Get a standard error like
Actual behavior
Exception "NoMethodError - undefined method `keyword_arguments' for #<GraphQL::ExecutionError:..." is thrown, without any specific backtrace.
Additional context
Some debugging points a problem in
graphql-1.12.13/lib/graphql/analysis/ast/query_complexity.rb:56
:Seems to
arguments
be aGraphQL::ExecutionError
instance, butGraphQL::ExecutionError
has no methodkeyword_arguments
Workaround is to define own exception like:
and raise it instead of native
GraphQL::ExecutionError
.The text was updated successfully, but these errors were encountered: