Module: GraphQL::Schema::SubclassGetReferencesTo

Defined in:
lib/graphql/schema.rb

Overview

-- @requires_ancestor: singleton(GraphQL::Schema)

Instance Method Summary collapse

Instance Method Details

#get_references_to(type_defn) ⇒ Object



2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
# File 'lib/graphql/schema.rb', line 2823

def get_references_to(type_defn)
  own_refs = own_references_to[type_defn]
  inherited_refs = superclass.references_to(type_defn)
  if inherited_refs&.any?
    if own_refs&.any?
      own_refs + inherited_refs
    else
      inherited_refs
    end
  else
    own_refs
  end
end