restql 1.2.0 → 1.2.2

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.
Files changed (2) hide show
  1. package/README.md +9 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RestQL.js
1
+ # RestQL
2
2
 
3
3
  RESTful API Resolver for Nested-Linked Resources | 🕸 🕷
4
4
 
@@ -27,11 +27,11 @@ npm install restql
27
27
 
28
28
  ## Usage
29
29
 
30
- ### `restql(resource, resolver[, options])`
30
+ ### `restql<T>(resource, resolver[, options])`
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
 
@@ -40,13 +40,13 @@ npm install restql
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 current one.
44
- - RestQL parses the same and calls the next resolver against them.
45
- - Until the base case (`null`) is reached, from which it returns the merged responses.
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 the quantifiers you can use:
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 bypass.
73
+ - `[options]` ([`RequestInit`](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)): The options to configure.
74
74
 
75
75
  ##### Example
76
76
 
@@ -80,7 +80,7 @@ Following is a table of the quantifiers you can use:
80
80
 
81
81
  #### Returns
82
82
 
83
- (`Promise<T extends object = Record<string, unknown>>`): A promise which resolves into an object.
83
+ (`Promise<T>`): A promise which resolves into a generic.
84
84
 
85
85
  ## Try It
86
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "restql",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "RESTful API Resolver for Nested-Linked Resources | 🕸 🕷",
5
5
  "type": "module",
6
6
  "unpkg": "./dist/index.js",