Module: GraphQL::Schema::SubclassGetReferencesTo

Defined in:
lib/graphql/schema.rb

Instance Method Summary collapse

Instance Method Details

#get_references_to(type_defn) ⇒ Object



1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
# File 'lib/graphql/schema.rb', line 1732

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