Module: GraphQL::Schema::DefaultTypeError Private

Defined in:
lib/graphql/schema/default_type_error.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.call(type_error, ctx) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
8
9
10
11
12
# File 'lib/graphql/schema/default_type_error.rb', line 5

def self.call(type_error, ctx)
  case type_error
  when GraphQL::InvalidNullError
    ctx.errors << type_error
  when GraphQL::UnresolvedTypeError, GraphQL::StringEncodingError
    raise type_error
  end
end