Commit b89dced0 authored by Alp Deniz Ogut's avatar Alp Deniz Ogut
Browse files

Add filters and sorting to docs

parent 2c2e25ac
Showing with 40 additions and 3 deletions
+40 -3
......@@ -61,8 +61,45 @@ Pagination is possible by using limit and offset variables in a query.
}
```
## Metadata
Aside from the data itself, one can request other metadata as well.
## Filters
Items can be filtered by a variaty of operators, namely eq, ne, gt, lt, gte, lte, and, or.
```json
{
query {
Account (filter: {dateCreated: {gte: 1654784703}}) {
displayName
}
}
}
```
Filters can be applied to edges as well:
```json
{
query {
Person {
~owner (filter: {displayName: {eq: "Alice"}}) {
displayName
}
}
}
}
```
## Sorting
To sort items "order_desc" and "order_asc" arguments are available.
```json
{
query {
Account (order_desc: dateCreated) {
id
displayName
}
}
}
```
## Metadata (Not yet implmented)
Along with the data itself, one can request other metadata.
```json
{
query {
......@@ -95,7 +132,7 @@ Those GraphQL queries above are wrapped around to conform to the usual HTTP API
Message (limit: 2) {
subject
service
sender (displayName: memri) {
sender (filter: {displayName: {eq: "memri"}}) {
displayName
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment