Package graphql.relay

Class DefaultConnection<T>

java.lang.Object
graphql.relay.DefaultConnection<T>
All Implemented Interfaces:
Connection<T>

@PublicApi public class DefaultConnection<T> extends Object implements Connection<T>
A default implementation of Connection
  • Field Details

    • edges

      private final com.google.common.collect.ImmutableList<Edge<T>> edges
    • pageInfo

      private final PageInfo pageInfo
  • Constructor Details

    • DefaultConnection

      public DefaultConnection(List<Edge<T>> edges, PageInfo pageInfo)
      A connection consists of a list of edges and page info
      Parameters:
      edges - a non null list of edges
      pageInfo - a non null page info
      Throws:
      IllegalArgumentException - if edges or page info is null. use Collections.emptyList() for empty edges.
  • Method Details