Interface SimpleConnection<T>

  • Type Parameters:
    T - The type of the entities
    All Superinterfaces:
    graphql.relay.Connection<T>
    All Known Subinterfaces:
    SimplePaginatedData<T>
    All Known Implementing Classes:
    AbstractSimplePaginatedData, SimplePaginatedDataImpl

    public interface SimpleConnection<T>
    extends graphql.relay.Connection<T>
    This is a more intuitive implementation for paging. You send back only the data that is requested, along with "overall" - the amount of all the entities
    • Method Detail

      • getData

        java.util.List<T> getData()
        Get the list of the entities
        Returns:
        List of entities
      • getTotalCount

        long getTotalCount()
        The amount of entities
        Returns:
        The amount of entities
      • getEdges

        default java.util.List<graphql.relay.Edge<T>> getEdges()
        Specified by:
        getEdges in interface graphql.relay.Connection<T>
      • getPageInfo

        default graphql.relay.PageInfo getPageInfo()
        Specified by:
        getPageInfo in interface graphql.relay.Connection<T>