lib/graphql/schema/build_from_definition.rb in graphql-1.9.0.pre1 vs lib/graphql/schema/build_from_definition.rb in graphql-1.9.0.pre2
- old
+ new
@@ -62,13 +62,11 @@
when GraphQL::Language::Nodes::DirectiveDefinition
directives[definition.name] = build_directive(definition, type_resolver)
end
end
- GraphQL::Schema::DIRECTIVES.each do |built_in_directive|
- directives[built_in_directive.name] = built_in_directive unless directives[built_in_directive.name]
- end
+ directives = GraphQL::Schema.default_directives.merge(directives)
if schema_definition
if schema_definition.query
raise InvalidDocumentError.new("Specified query type \"#{schema_definition.query}\" not found in document.") unless types[schema_definition.query]
query_root_type = types[schema_definition.query]
@@ -111,10 +109,10 @@
schema
end
NullResolveType = ->(type, obj, ctx) {
- raise(NotImplementedError, "Generated Schema cannot use Interface or Union types for execution.")
+ raise(NotImplementedError, "Generated Schema cannot use Interface or Union types for execution. Implement resolve_type on your resolver.")
}
NullScalarCoerce = ->(val, _ctx) { val }
def build_enum_type(enum_type_definition, type_resolver)