Skip to main content
Version: Next (2.x)

PaginationOptions<Keys>

Configuration options for the pagination plugin

Type Parameters

Type ParameterDefault type

Keys extends string | number | symbol

string

Properties

PropertyTypeDefault valueDescription

types

{ [key in string | number | symbol]?: boolean | PaginationTypeOptions }

undefined

Map of type names to their pagination configuration.

Example

{
// Simple configuration
User: true,

// Advanced configuration
UserCustom: {
nodeType: "User",
cursorType: "UUID!",
connectionFields: ["totalCount: Int!"],
edgeFields: ["hasPhotos: Boolean!"]
}
}

moduleName?

string

"baeta-pagination";

Custom name for the pagination module

nullableNode?

boolean

true;

Whether the node field should be nullable in all connections

pageInfoFields?

string[]

undefined

Additional fields to add to the PageInfo type

Example

["hasMorePages: Boolean!"];