lib/graphql/schema/loader.rb in graphql-1.9.14 vs lib/graphql/schema/loader.rb in graphql-1.9.15

- old
+ new

@@ -32,11 +32,11 @@ Schema.define(**kargs, raise_definition_error: true) end NullResolveType = ->(type, obj, ctx) { - raise(NotImplementedError, "This schema was loaded from string, so it can't resolve types for objects") + raise(GraphQL::RequiredImplementationMissingError, "This schema was loaded from string, so it can't resolve types for objects") } NullScalarCoerce = ->(val, _ctx) { val } class << self @@ -49,11 +49,11 @@ when "LIST" ListType.new(of_type: resolve_type(types, type.fetch("ofType"))) when "NON_NULL" NonNullType.new(of_type: resolve_type(types, type.fetch("ofType"))) else - fail NotImplementedError, "#{kind} not implemented" + fail GraphQL::RequiredImplementationMissingError, "#{kind} not implemented" end end def extract_default_value(default_value_str, input_value_ast) case input_value_ast @@ -169,10 +169,10 @@ possible_types: type["possibleTypes"].map { |possible_type| type_resolver.call(possible_type) } ) else - fail NotImplementedError, "#{type["kind"]} not implemented" + fail GraphQL::RequiredImplementationMissingError, "#{type["kind"]} not implemented" end end end end end