[v0.4.1.experimental.1] Offset pagination feat: experimental offset-pagination
Pre-release
Pre-release
Introduced
AsyncMongoenginePaginationObjectType
AsyncMongoenginePaginationField
Usages
Sample
query UsersQuery($offset: Int, $limit: Int) {
usersQuery(offset: $offset, limit: $limit) {
edges {
node {
id
}
}
pageCount # new field
}
}
Recommended Usage
query UsersQuery($offset: Int, $limit: Int, $requires_page_count: Boolean!) {
usersQuery(offset: $offset, limit: $limit) {
edges {
node {
id
}
}
pageCount @include(if: $requires_page_count)
}
}
@include
directive can be used to auto include the field dynamically
or you can achieve the same using the @skip
directive