lib/graphql/internal_representation/node.rb
def typed_children
        @typed_children ||= begin
          if @scoped_children.any?
            new_tc = Hash.new(&DEFAULT_TYPED_CHILDREN)
            all_object_types = Set.new
            scoped_children.each_key { |t| all_object_types.merge(@query.possible_types(t)) }
            # Remove any scoped children which don't follow this return type
            # (This can happen with fragment merging where lexical scope is lost)
            all_object_types &= @query.possible_types(@return_type.unwrap)
            all_object_types.each do |t|
              new_tc[t] = get_typed_children(t)
            end
            new_tc
          else
            NO_TYPED_CHILDREN
          end

        end
      end
# Each key is a {GraphQL::ObjectType} which this selection _may_ be made on.
# The values for that key are selections which apply to that type.
#
# This value is derived from {#scoped_children} after the rewrite is finished.
# @return [Hash<GraphQL::ObjectType, Hash<String => Node>>]
Each key is a {GraphQL::ObjectType} which this selection _may_ be made on.
The values for that key are selections which apply to that type.

This value is derived from {#scoped_children} after the rewrite is finished.
Each key is a { GraphQL :: ObjectType } which this selection _may_ be made on . The values for that key are selections which apply to that type . This value is derived from { #scoped_children } after the rewrite is finished .
def typed_children
        @typed_children ||= begin
          if @scoped_children.any?
            new_tc = Hash.new(&DEFAULT_TYPED_CHILDREN)
            all_object_types = Set.new
            scoped_children.each_key { |t| all_object_types.merge(@query.possible_types(t)) }
            all_object_types &= @query.possible_types(@return_type.unwrap)
            all_object_types.each do |t|
              new_tc[t] = get_typed_children(t)
            end
            new_tc
          else
            NO_TYPED_CHILDREN
          end
        end
      end
def typed_children @typed_children ||= begin if @scoped_children . any? new_tc = Hash . new ( & DEFAULT_TYPED_CHILDREN ) all_object_types = Set . new scoped_children . each_key { | t | all_object_types . merge ( @query . possible_types ( t ) ) } all_object_types &= @query . possible_types ( @return_type . unwrap ) all_object_types . each do | t | new_tc [ t ] = get_typed_children ( t ) end new_tc else NO_TYPED_CHILDREN end end end
Each key is a {GraphQL::ObjectType} which this selection _may_ be made on.
Each key is a { GraphQL :: ObjectType } which this selection _may_ be made on .
# Remove any scoped children which don't follow this return type # (This can happen with fragment merging where lexical scope is lost)
None
Hash<GraphQL::ObjectType, Hash<String => Node>>