-
-
Notifications
You must be signed in to change notification settings - Fork 120
GraphQL Filtering
Ghislain B edited this page Oct 24, 2017
·
53 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 filtering uses filterBy
with a structure which we think is flexible enough. The query will have a filterBy
argument with an array of filter properties:
-
filterBy
: array of filter object(s) (see below)-
field
: field name to filter -
value
: search filter value -
operator
: a GraphQL enum (server side) that can have 1 of these choices:-
LT
,LE
,GT
,GE
,NE
,EQ
,Contains
,StartsWith
,EndsWith
,IN
,NIN
-
Contains
is the default and will be used (by the grid) when operator is not provided -
IN
andNIN
(Not IN) are mainly used for multi-select filtering
-
-
-
Note: the filterBy
order is following the order of how the filter objects were entered in the array.
For example, a filter that would search for a firstName that starts with "John"
- matches: "John", "Johnny", ...
users (first: 20, offset: 10, filterBy: [{field: firstName, operator: StartsWith, value: 'John'}]) {
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