Skip to content

Commit

Permalink
Handle null list values
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Apr 25, 2024
1 parent 7ae33ae commit 3027f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/graphql/schema/argument.rb
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def recursively_prepare_input_object(value, type)
type = type.of_type
end

if type.list?
if type.list? && !value.nil?
inner_type = type.of_type
value.map { |v| recursively_prepare_input_object(v, inner_type) }
elsif value.is_a?(GraphQL::Schema::InputObject)
Expand Down

0 comments on commit 3027f03

Please sign in to comment.