module GraphQL::StaticValidation::FragmentSpreadsArePossible

def on_document(node, parent)

def on_document(node, parent)
  super
  @spreads_to_validate.each do |frag_spread|
    frag_node = context.fragments[frag_spread.node.name]
    if frag_node
      fragment_child_name = frag_node.type.name
      fragment_child = context.warden.get_type(fragment_child_name)
      # Might be non-existent type name
      if fragment_child
        validate_fragment_in_scope(frag_spread.parent_type, fragment_child, frag_spread.node, context, frag_spread.path)
      end
    end
  end
end