-
-
Notifications
You must be signed in to change notification settings - Fork 19
GraphQL Sorting
Ghislain B edited this page Nov 12, 2017
·
15 revisions
The implementation of a GraphQL Service requires a certain structure to follow for Aurelia-Slickgrid
to work correctly (it will fail if your GraphQL Schema is any different than what is shown below).
For the implementation in your code, refer to the GraphQL Service section.
The sorting uses orderBy
as per this GitHub Suggestion of a Facebook employee. The query will have a orderBy
argument with an array of filter properties:
-
orderBy
: array of sorting object(s) (see below)-
field
: field name to sort -
direction
: a GraphQL enum (server side) that can have 1 of these choices:-
ASC
,DESC
-
-
Note: the orderBy
order is following the order of how the filter objects were entered in the array.
For example
users (first: 20, offset: 10, orderBy: [{field: lastName, direction: ASC}, {field: firstName, direction: DESC}]) {
totalCount
pageInfo {
hasNextPage
}
nodes {
name
firstName
lastName
gender
}
}
Contents
- Aurelia-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
- Add/Delete/Update or Highlight item
- Dynamically Change Row CSS Classes
- Column Picker
- Composite Editor Modal
- Context Menu
- Custom Tooltip
- Excel Copy Buffer
- Export to Excel
- Export to File (CSV/Txt)
- Grid Menu
- Grid State & Presets
- Grouping & Aggregators
- Header Menu & Header Buttons
- Header Title Grouping
- Pinning (frozen) of Columns/Rows
- Row Colspan
- Row Detail
- Row Selection
- Tree Data Grid
- SlickGrid & DataView objects
- Addons (controls/plugins)
- Backend Services