@alxia/graphql 0.18.2 → 0.18.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 +1 -1
- package/dist/operation.d.ts +1 -1
- package/dist/operation.d.ts.map +1 -1
- package/docs/migrating-to-graxia.md +9 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ bun add -d typescript
|
|
|
13
13
|
bun add @graxia/envelop @envelop/depth-limit # install yourself to use Envelop plugins
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
`@graxia/core` (`^0.10.0 || ^0.11.0`), `@graxia/graphiql` (`^0.2.4`) and `graphql` (17.1 or later) are peers:
|
|
16
|
+
`@graxia/core` (`^0.10.0 || ^0.11.0 || ^0.12.0`), `@graxia/graphiql` (`^0.2.4`) and `graphql` (17.1 or later) are peers:
|
|
17
17
|
the package declares no dependency. `@graxia/graphiql` serves the IDE and is
|
|
18
18
|
required. CSRF protection is graxia's default (on): a `GET` needs one of the
|
|
19
19
|
`x-graphql-csrf`, `graphql-require-preflight`, `apollo-require-preflight` or
|
package/dist/operation.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** A graxia plugin reporting each operation graxia executes or subscribes to. */
|
|
2
|
-
export declare function reportsOperations(): import("@graxia/core").GraxiaPlugin<import("@graxia/core").Empty, import("@graxia/core").Empty>;
|
|
2
|
+
export declare function reportsOperations(): import("@graxia/core").GraxiaPlugin<import("@graxia/core").Empty, import("@graxia/core").Empty, "alxia-report-operations">;
|
|
3
3
|
//# sourceMappingURL=operation.d.ts.map
|
package/dist/operation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../src/operation.ts"],"names":[],"mappings":"AAsIA,iFAAiF;AACjF,wBAAgB,iBAAiB
|
|
1
|
+
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../src/operation.ts"],"names":[],"mappings":"AAsIA,iFAAiF;AACjF,wBAAgB,iBAAiB,+HAwEhC"}
|
|
@@ -26,7 +26,7 @@ bun add graphql@^17.1.0
|
|
|
26
26
|
|
|
27
27
|
| Before | After |
|
|
28
28
|
| --- | --- |
|
|
29
|
-
| `graphql-yoga` | `@graxia/core` `^0.10.0 \|\| ^0.11.0` (0.10 sets the HTTP status from errors again) |
|
|
29
|
+
| `graphql-yoga` | `@graxia/core` `^0.10.0 \|\| ^0.11.0 \|\| ^0.12.0` (0.10 sets the HTTP status from errors again) |
|
|
30
30
|
| `graphql-ws` (for `ws`) | nothing: graxia speaks `graphql-transport-ws` |
|
|
31
31
|
| bundled GraphiQL of Yoga | `@graxia/graphiql` `^0.2.4` (required) |
|
|
32
32
|
| Envelop plugins | not a peer: install `@graxia/envelop` yourself to use Envelop plugins |
|
|
@@ -132,9 +132,15 @@ export const plugins = [fromEnvelop([useDepthLimit({ maxDepth: 8 })])];
|
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
**Janus.** `useJanus()` was a Yoga plugin. Use `@softistx/janus-graphql`
|
|
135
|
-
`^0.
|
|
135
|
+
`^0.37.0` (or later) and its `/graxia` entry, `janusGraxia(options)`, in `plugins`.
|
|
136
136
|
`fromEnvelop` refuses the old plugin at boot, since it relies on Yoga's
|
|
137
|
-
`onResponse` hook; wrapping it is not a way around.
|
|
137
|
+
`onResponse` hook; wrapping it is not a way around. If the app renames error
|
|
138
|
+
codes with `mapCode`, pass the same `mapCode` to `janusGraxia` and
|
|
139
|
+
`janusGraxiaMaskError`: from 0.37.0 `janusGraxia` maps the codes of every
|
|
140
|
+
result (janus denials, already-coded errors, each subscription event and
|
|
141
|
+
`@defer` payload), and `janusGraxiaMaskError` those of the errors graxia masks.
|
|
142
|
+
See janus-graphql's
|
|
143
|
+
[graxia guide](https://github.com/softistx/nxgt-janus/blob/develop/packages/janus-graphql/docs/guide/graxia.md).
|
|
138
144
|
|
|
139
145
|
```diff
|
|
140
146
|
-import { useJanus } from '@softistx/janus-graphql';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alxia/graphql",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"description": "GraphQL for alxia served by @graxia/core: its plugins, subscriptions over SSE or WebSocket and GraphiQL, behind the app's hooks, its resolvers reading the app's typed context",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"@alxia/telemetry": "^0.9.4",
|
|
53
53
|
"@envelop/core": "^6.0.1",
|
|
54
54
|
"@envelop/depth-limit": "^7.2.1",
|
|
55
|
-
"@graxia/core": "^0.
|
|
56
|
-
"@graxia/envelop": "^0.1.
|
|
57
|
-
"@graxia/graphiql": "^0.2.
|
|
55
|
+
"@graxia/core": "^0.12.0",
|
|
56
|
+
"@graxia/envelop": "^0.1.6",
|
|
57
|
+
"@graxia/graphiql": "^0.2.6",
|
|
58
58
|
"@softistx/telemetry": "^0.5.0",
|
|
59
59
|
"@types/bun": "^1.4.4",
|
|
60
60
|
"dataloader": "^2.2.3",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@alxia/core": "^0.27.0",
|
|
65
65
|
"graphql": "^17.1.0",
|
|
66
66
|
"typescript": "^6.0.3 || ^7.0.0",
|
|
67
|
-
"@graxia/core": "^0.10.0 || ^0.11.0",
|
|
67
|
+
"@graxia/core": "^0.10.0 || ^0.11.0 || ^0.12.0",
|
|
68
68
|
"@graxia/graphiql": "^0.2.4"
|
|
69
69
|
}
|
|
70
70
|
}
|