Skip to content

Commit cc32ec2

Browse files
committed
Don't add late-bound types as orphan types
1 parent f8e879f commit cc32ec2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/graphql/schema/build_from_definition.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,11 @@ def build(schema_superclass, document, default_resolve:, using: {}, relay:)
121121
builder = self
122122

123123
found_types = types.values
124-
object_types = found_types.select { |t| t.kind.object? }
125124
schema_class = Class.new(schema_superclass) do
126125
begin
127126
# Add these first so that there's some chance of resolving late-bound types
128127
add_type_and_traverse(found_types, root: false)
129-
orphan_types(object_types)
128+
orphan_types(found_types.select { |t| t.respond_to?(:kind) && t.kind.object? })
130129
query query_root_type
131130
mutation mutation_root_type
132131
subscription subscription_root_type

0 commit comments

Comments
 (0)