Skip to content

Commit a549001

Browse files
committed
Use a faster check for loadable?
1 parent 7bbcf60 commit a549001

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/graphql/schema/warden.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def types
232232

233233
# @return [Boolean] True if this type is used for `loads:` but not in the schema otherwise and not _explicitly_ hidden.
234234
def loadable?(type, _ctx)
235-
!reachable_type_set.include?(type) && visible_type?(type)
235+
visible_type?(type) && !referenced?(type)
236236
end
237237

238238
def loadable_possible_types(union_type, _ctx)

0 commit comments

Comments
 (0)