We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a549001 commit 94c6284Copy full SHA for 94c6284
2 files changed
lib/graphql/schema/visibility/profile.rb
@@ -256,8 +256,7 @@ def directives
256
end
257
258
def loadable?(t, _ctx)
259
- load_all_types
260
- !@all_types[t.graphql_name] && @cached_visible[t]
+ @cached_visible[t] && !referenced?(t)
261
262
263
def loadable_possible_types(t, _ctx)
lib/graphql/schema/warden.rb
@@ -232,7 +232,9 @@ def types
232
233
# @return [Boolean] True if this type is used for `loads:` but not in the schema otherwise and not _explicitly_ hidden.
234
def loadable?(type, _ctx)
235
- visible_type?(type) && !referenced?(type)
+ visible_type?(type) &&
236
+ !referenced?(type) &&
237
+ (type.respond_to?(:interfaces) ? interfaces(type).all? { |i| loadable?(i, _ctx) } : true)
238
239
240
def loadable_possible_types(union_type, _ctx)
0 commit comments