ConnectionArguments

Typed access to the pagination inputs (first, after, last, before) of a connection field.

Codegen picks the right sub-interface based on which arguments the schema declares. calls toOffsetLimit internally — call it directly only when you need the offset/limit to query a backend before using the builder.

Java equivalent of Kotlin's viaduct.api.types.ConnectionArguments.

See also

Inheritors

Properties

Link copied to clipboard
Default page size used when first/last are not specified.

Functions

Link copied to clipboard
Returns true if toOffsetLimit requires knowing the total count of items to compute the correct offset.
Link copied to clipboard
Converts connection arguments to offset/limit using the default page size.
abstract fun toOffsetLimit(defaultPageSize: Int): OffsetLimit
Converts connection arguments to offset/limit for database queries.
open fun toOffsetLimit(totalCount: Int, defaultPageSize: Int): OffsetLimit
Converts connection arguments to offset/limit when the total count of items is known.
Link copied to clipboard
abstract fun validate()
Validate connection arguments without converting.