class Connection<T : Node>(val nodes: List<T>, val pageInfo: PageInfo, val totalCount: Int?, val order: Order<T>)

Connection used as ObjectType in the GraphQL API Represents the many side of a relation and supports filtering, ordering and pagination

Parameters

nodes

all related nodes

pageInfo

general connection information

totalCount

if fetched, the total amount of items in the relation

order

defines how the items are ordered in the connection, necessary for cursor definition

Constructors

Link copied to clipboard
constructor(nodes: List<T>, pageInfo: PageInfo, totalCount: Int?, order: Order<T>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val nodes: List<T>
Link copied to clipboard
private val order: Order<T>
Link copied to clipboard
Link copied to clipboard
private val totalCount: Int?

Functions

Link copied to clipboard
fun edges(): List<Edge<T>>

Returns the nodes associated with a cursor local context is handled by the returned Edge (see Edge.node) and therefore not set by this method

Link copied to clipboard

The total count of nodes in the connection (before filtering and pagination)