Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Fix field usage on prepared input types#1

Open
jrichardlai wants to merge 2 commits intomasterfrom
fix-field-usage-on-prepared-input-types
Open

Fix field usage on prepared input types#1
jrichardlai wants to merge 2 commits intomasterfrom
fix-field-usage-on-prepared-input-types

Conversation

@jrichardlai
Copy link
Copy Markdown

Note

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

A bug report has been submitted rmosolgo#4864

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
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants