lib/graphql/schema/loader.rb in graphql-0.19.3 vs lib/graphql/schema/loader.rb in graphql-0.19.4

- old
+ new

@@ -12,11 +12,11 @@ # @return [GraphQL::Schema] the schema described by `input` def load(introspection_result) schema = introspection_result.fetch("data").fetch("__schema") types = {} - type_resolver = -> (type) { -> { resolve_type(types, type) } } + type_resolver = ->(type) { -> { resolve_type(types, type) } } schema.fetch("types").each do |type| next if type.fetch("name").start_with?("__") type_object = define_type(type, type_resolver) types[type_object.name] = type_object @@ -29,10 +29,10 @@ end Schema.define(**kargs) end - NullResolveType = -> (obj, ctx) { + NullResolveType = ->(obj, ctx) { raise(NotImplementedError, "This schema was loaded from string, so it can't resolve types for objects") } class << self private