restql 1.2.1 → 1.2.3
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 +8 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ RESTful API Resolver for Nested-Linked Resources | 🕸 🕷
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
[](https://www.npmjs.com/package/restql
|
|
7
|
+
[](https://www.npmjs.com/package/restql)
|
|
8
8
|

|
|
9
9
|

|
|
10
10
|
|
|
@@ -31,22 +31,22 @@ npm install restql
|
|
|
31
31
|
|
|
32
32
|
#### Parameters
|
|
33
33
|
|
|
34
|
-
- `resource` (`string`): The resource to fetch.
|
|
34
|
+
- `resource` (`string`): The main resource to fetch.
|
|
35
35
|
|
|
36
36
|
##### Example
|
|
37
37
|
|
|
38
38
|
```js
|
|
39
|
-
'https://pokeapi.co/api/v2/pokemon/1
|
|
39
|
+
'https://pokeapi.co/api/v2/pokemon/1'
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
- `resolver` ([`Resolver`](https://github.com/relztic/restql/blob/main/src/types.ts#L1)): The resolver to apply.
|
|
43
|
-
- At every level, each property describes a path to the nested resources within the
|
|
44
|
-
- RestQL
|
|
45
|
-
- Until the base case (`null`)
|
|
43
|
+
- At every level, each property describes a path to the nested resources within the same.
|
|
44
|
+
- RestQL fetches all resources and calls the next resolver against them.
|
|
45
|
+
- Until it reaches the base case (`null`), from which it returns a merged response.
|
|
46
46
|
|
|
47
47
|
##### Quantifiers
|
|
48
48
|
|
|
49
|
-
Following is a table of
|
|
49
|
+
Following is a table of quantifiers you can use:
|
|
50
50
|
|
|
51
51
|
| Quantifier | Description |
|
|
52
52
|
| ---------- | ------------------------- |
|
|
@@ -70,7 +70,7 @@ Following is a table of the quantifiers you can use:
|
|
|
70
70
|
}
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
- `[options]` ([`RequestInit`](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)): The options to
|
|
73
|
+
- `[options]` ([`RequestInit`](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)): The options to configure.
|
|
74
74
|
|
|
75
75
|
##### Example
|
|
76
76
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "restql",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "RESTful API Resolver for Nested-Linked Resources | 🕸 🕷",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"unpkg": "./dist/index.js",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"recursive",
|
|
47
47
|
"resolver"
|
|
48
48
|
],
|
|
49
|
-
"author": "Ariel Díaz <relztic@gmail.com> (https://www.linkedin.com/in/relztic
|
|
49
|
+
"author": "Ariel Díaz <relztic@gmail.com> (https://www.linkedin.com/in/relztic)",
|
|
50
50
|
"license": "MIT",
|
|
51
51
|
"bugs": {
|
|
52
|
-
"url": "https://github.com/relztic/restql/issues
|
|
52
|
+
"url": "https://github.com/relztic/restql/issues"
|
|
53
53
|
},
|
|
54
|
-
"homepage": "https://github.com/relztic/restql
|
|
54
|
+
"homepage": "https://github.com/relztic/restql#readme",
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"es-toolkit": "^1.44.0"
|
|
57
57
|
},
|