@nxgt/datasource-rest 1.0.0 → 1.0.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.
- package/README.md +11 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
# @nxgt/
|
|
1
|
+
# @nxgt/datasource-rest
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An Apollo-style REST datasource over `openapi-fetch`: auth forwarding, caching
|
|
4
|
+
and error translation, so a GraphQL resolver can call a REST service with the
|
|
5
|
+
same typed client the REST apps use.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```
|
|
7
|
+
Errors come back as `CustomException` from `@nxgt/shared-exceptions`, so a
|
|
8
|
+
downstream 404 surfaces as a `NotFound` rather than a transport failure.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## Install
|
|
10
11
|
|
|
11
12
|
```bash
|
|
12
|
-
bun
|
|
13
|
+
bun add @nxgt/datasource-rest
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
Public on npmjs; no token needed to install. TypeScript is a peer, pinned to
|
|
17
|
+
`^6.0.3` across every `@nxgt/*` package — the set is unsatisfiable if one of
|
|
18
|
+
them widens it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/datasource-rest",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"lodash": "^4.18.1",
|
|
41
|
-
"@nxgt/shared": "1.0.
|
|
42
|
-
"@nxgt/shared-exceptions": "1.0.
|
|
41
|
+
"@nxgt/shared": "^1.0.1",
|
|
42
|
+
"@nxgt/shared-exceptions": "^1.0.1",
|
|
43
43
|
"openapi-fetch": "^0.17.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|