@ttoss/graphql-api 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -206,7 +206,7 @@ The resolver `connection` has the following arguments based on the [Relay Connec
|
|
|
206
206
|
- `before`: the cursor to start the query.
|
|
207
207
|
- `limit`: the limit of nodes to return. It's the `first` or `last` argument plus one. It's used to know if there are more nodes to return to set `hasNextPage` or `hasPreviousPage` [PageInfo](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo) fields. For example, if `first` is `10`, `limit` will be `11`. If the resolver returns `11` nodes, the resolver will return `10` but it knows there are more nodes to return, so `hasNextPage` will be `true`.
|
|
208
208
|
- `skip`: it's the `count` minus `last`. It only works on [backward pagination](https://relay.dev/graphql/connections.htm#sec-Backward-pagination-arguments).
|
|
209
|
-
- `sort`: the sort option to use. It's the
|
|
209
|
+
- `sort`: the sort option to use. It's the `value` of the `sort` object. In our example, it's `{ scanIndexForward: true }` for `ASC` and `{ scanIndexForward: false }`, for `DESC`.
|
|
210
210
|
- `filter`: the filter to use. It'll exist if you add the `filter` to `findManyResolver` for example, the implementation below will add the `filter` argument with the `name` and `book` fields:
|
|
211
211
|
|
|
212
212
|
```ts
|
|
@@ -290,7 +290,7 @@ The resolver that will be used to count the nodes.
|
|
|
290
290
|
|
|
291
291
|
It's an object that defines the sort options. Each key is the sort name and the value is an object with the following properties:
|
|
292
292
|
|
|
293
|
-
- `value`: and object that the resolver will receive as the `sort` argument.
|
|
293
|
+
- `value`: and object that the `args` resolver will receive as the `sort` argument. It'll also be the values of the sort enum composer created (check the implementation details [here](https://github.com/graphql-compose/graphql-compose-connection/blob/master/src/types/sortInputType.ts).)
|
|
294
294
|
- `cursorFields`: an array of fields that will be used to create the cursor.
|
|
295
295
|
- `beforeCursorQuery` and `afterCursorQuery`: methods that will be used to create the `rawQuery` object for the `findManyResolver`. They receive the following arguments:
|
|
296
296
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/graphql-api",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A library for building GraphQL APIs using ttoss ecosystem.",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@types/yargs": "^17.0.32",
|
|
50
50
|
"graphql": "^16.8.1",
|
|
51
51
|
"jest": "^29.7.0",
|
|
52
|
-
"tsup": "^8.0.
|
|
53
|
-
"@ttoss/config": "^1.31.
|
|
52
|
+
"tsup": "^8.0.2",
|
|
53
|
+
"@ttoss/config": "^1.31.5"
|
|
54
54
|
},
|
|
55
55
|
"keywords": [
|
|
56
56
|
"api",
|