def connection_field?(field)
      type = field.type.unwrap

      if edges_field = type.get_field('edges')
        edges = edges_field.type.unwrap
        if node_field = edges.get_field('node')
          return node_field?(node_field)
        end
      end

      false
    end
def connection_field?(field)
      type = field.type.unwrap

      if edges_field = type.get_field('edges')
        edges = edges_field.type.unwrap
        if node_field = edges.get_field('node')
          return node_field?(node_field)
        end
      end

      false
    end
Is this field for a relay connection?

 field - A GraphQL::Field instance.

 Returns true if this field's type has a `edges` field whose type has a
 `node` field that is a relay node. Returns false otherwise.