Skip to content

Commit

Permalink
Allow directive argument types to be LateBoundTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed May 11, 2021
1 parent ae8b48a commit 9e4eea9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/graphql/schema/build_from_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def build(document, default_resolve:, using: {}, relay:)
directive_type_resolver = build_resolve_type(GraphQL::Schema::BUILT_IN_TYPES, directives, ->(type_name) {
types[type_name] ||= begin
defn = document.definitions.find { |d| d.respond_to?(:name) && d.name == type_name }
build_definition_from_node(defn, directive_type_resolver, default_resolve)
build_definition_from_node(defn, type_resolver, default_resolve)
end
})

Expand Down
4 changes: 4 additions & 0 deletions spec/graphql/schema/build_from_definition_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ def assert_schema_and_compare_output(definition)
directive @foo(arg: InputA) on FIELD
type Hello {
int: Int
}
input InputA {
value: InputB
}
Expand Down

0 comments on commit 9e4eea9

Please sign in to comment.