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

Fix field usage on prepared input types #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jrichardlai
Copy link

Note

This fix just prevents FieldUsage from breaking when an InputType is preparing a value.

A bug report has been submitted rmosolgo#4864

@@ -48,7 +48,7 @@ def extract_deprecated_arguments(argument_values)
argument_type = argument_type.of_type
end

if argument_type.kind.input_object?
if argument_type.kind.input_object? && argument.value.respond_to?(:arguments) # Skip if value is not a GraphQL::Schema::InputObject
Copy link

Choose a reason for hiding this comment

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

We are running into the same issue with the graphql-ruby upgrade and this problem also happens below on line 60.

That is the case where the argument is a list of input objects. The call to value.arguments there fails too.

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