Skip to content

Commit 5461677

Browse files
committed
Readme minor improvements
1 parent c7ac41e commit 5461677

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

readme.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Assume you have similar `where` and `orderBy` queries:
99

1010
```js
1111
animal({
12-
where: `
12+
where: {
1313
OR: [
1414
{ type_not_in: ["mammal", "fish"] },
1515
{ AND: [{ id: 1 }, { name: "pigeon" }] }
@@ -22,7 +22,7 @@ animal({
2222
slug_not_in: ["slug-a"]
2323
name_gte: "A"
2424
}
25-
`,
25+
},
2626
orderBy: name_desc
2727
}) {
2828
id
@@ -37,7 +37,7 @@ animal({
3737
}
3838
```
3939

40-
an output is going to be:
40+
an query will be parsed:
4141

4242
```js
4343
const openCrudParser = require('open-crud-parser')
@@ -152,4 +152,14 @@ const formattedOrderBy = formatOrderBy(query.orderBy)
152152
order: 'desc
153153
}]
154154
*/
155-
```
155+
```
156+
157+
## How it works
158+
159+
This library parses your schema field names by following scheme:
160+
161+
```
162+
name_not_gte: String
163+
164+
[name-itself]_[negation]_[modifier]
165+
```

0 commit comments

Comments
 (0)