-
-
Notifications
You must be signed in to change notification settings - Fork 119
GraphQL Sorting
Ghislain B edited this page Oct 19, 2017
·
25 revisions
The implementation of a GraphQL Service requires a certain structure to follow for Angular-Slickgrid
to work correctly (it will fail if your structure is any different than what is shown below).
The sorting uses orderBy
as per this GitHub Suggestion of a Facebook employee. The query will have this argument:
-
orderBy
: array of sorting object (see below)-
sort
: field name to sort -
direction
:ASC
orDESC
(must be anenum
GraphQL Type on server side between these 2 values)
-
Note: the sort is following the order of how the sort object are entered in the array.
For example
users (first: 20, offset: 10, orderBy: [{sort: lastName, direction: ASC}, {sort: firstName, direction: DESC}]) {
totalCount
pageInfo {
hasNextPage
}
nodes {
name
firstName
lastName
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