We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32b75fe commit 7d715d7Copy full SHA for 7d715d7
lib/graphql/invalid_null_error.rb
@@ -5,13 +5,12 @@ class InvalidNullError < GraphQL::Error
5
def initialize(field_name, value)
6
@field_name = field_name
7
@value = value
8
+ super("Cannot return null for non-nullable field #{@field_name}")
9
end
10
11
# @return [Hash] An entry for the response's "errors" key
12
def to_h
- {
13
- "message" => "Cannot return null for non-nullable field #{@field_name}"
14
- }
+ { "message" => message }
15
16
17
# @return [Boolean] Whether the null in question was caused by another error
0 commit comments