-
-
Notifications
You must be signed in to change notification settings - Fork 120
GraphQL Pagination
Ghislain B edited this page Apr 2, 2018
·
15 revisions
The implementation of a GraphQL Service requires a certain structure to follow for Angular-Slickgrid
to work correctly (it will fail if your GraphQL Schema is any different than what is shown below).
NOTE Since this is still in beta testing, only the option (without cursor) is currently supported.
For the implementation in your code, refer to the GraphQL Service section.
Pagination without cursor, this is the simplest implementation and is what we use on our side. The query can have any of the 3 arguments:
-
first
: integer representing how many rows of data to get from the start of dataset -
last
: integer representing how many rows of data to get from the end of dataset -
offset
: integer representing how many to skip
For example
users (first:20, offset: 10) {
totalCount
nodes {
name
gender
}
}
Pagination with cursor, the query can have any of the 4 arguments:
-
first
: integer representing how many rows of data to get from the start of dataset -
after
: pull data starting atcursor
"x", where "x" is the last itemcursor
-
last
: integer representing how many rows of data to get from the end of dataset -
before
: pull data before acursor
"x", where "x" is the last itemcursor
For example
users (first:20, after:"YXJyYXljb25uZWN0aW9uOjM=") {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
cursor
node {
name
gender
}
}
}
Contents
- Angular-Slickgrid Wiki
- Installation
- Styling
- Interfaces/Models
- Testing Patterns
- Column Functionalities
- Global Grid Options
- Localization
- Events
- Grid Functionalities
- Auto-Resize / Resizer Service
- Resize by Cell Content
- Composite Editor
- Context Menu
- Custom Tooltip
- Add/Delete/Update or Highlight item
- Dynamically Change Row CSS Classes
- Excel Copy Buffer
- Export to Excel
- Export to File (CSV/Txt)
- Grid State & Presets
- Grouping & Aggregators
- Row Detail
- SlickGrid Controls
- SlickGrid Plugins
- Pinning (frozen) of Columns/Rows
- Tree Data Grid
- SlickGrid & DataView objects
- Addons (controls/plugins)
- Backend Services