-
-
Notifications
You must be signed in to change notification settings - Fork 19
GraphQL JSON Result
Ghislain B edited this page Jan 4, 2020
·
8 revisions
The GraphQL JSON result will always follow a certain structure where only the dataset name and the nodes
array will change. With that in mind, if we look at the GraphqlResult
TypeScript interface, the JSON result will mostly follow this structure (except when Pagination is disabled if so continue reading):
The datasetName
is the only dynamic portion of the structure and in our demo will be users
.
export interface GraphqlResult {
data: {
[datasetName: string]: {
nodes: any[],
totalCount: number
}
}
}
If we consider that we defined a grid of Users and we provided the datasetName: 'users'
with 3 defined columns (firstName, lastName, email). The JSON result could look like the following:
{
"data": {
"users": {
"totalCount": 2,
"nodes": [
{
"id": 0,
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]"
},
{
"id": 1,
"firstName": "Jane",
"lastName": "Doe",
"email": "[email protected]"
}
]
}
}
}
{
"data": {
"users": [
{
"id": 0,
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]"
},
{
"id": 1,
"firstName": "Jane",
"lastName": "Doe",
"email": "[email protected]"
}
]
}
}
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