@alxia/graphql 0.18.0 → 0.18.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 +1 -1
- package/docs/migrating-to-graxia.md +9 -8
- 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`), `@graxia/graphiql` (`^0.2.4`) and `graphql` (17.1 or later) are peers:
|
|
16
|
+
`@graxia/core` (`^0.10.0 || ^0.11.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
|
|
@@ -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.10 sets the HTTP status from errors again) |
|
|
29
|
+
| `graphql-yoga` | `@graxia/core` `^0.10.0 \|\| ^0.11.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 |
|
|
@@ -126,13 +126,13 @@ export const plugins = [fromEnvelop([useDepthLimit({ maxDepth: 8 })])];
|
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
**Janus.** `useJanus()` was a Yoga plugin. Use `@softistx/janus-graphql`
|
|
129
|
-
|
|
129
|
+
`^0.36.1` (or later) and its `/graxia` entry, `janusGraxia(options)`, in `plugins`.
|
|
130
130
|
`fromEnvelop` refuses the old plugin at boot, since it relies on Yoga's
|
|
131
131
|
`onResponse` hook; wrapping it is not a way around.
|
|
132
132
|
|
|
133
|
-
<!-- Temporary, until nxgt-janus#
|
|
134
|
-
`@softistx/janus-graphql` 0.36.
|
|
135
|
-
peer warning until its next release.
|
|
133
|
+
<!-- Temporary, until nxgt-janus#1005 is released -->
|
|
134
|
+
`@softistx/janus-graphql` 0.36.1 declares `@graxia/core ^0.9.0 || ^0.10.0`; on
|
|
135
|
+
`@graxia/core` 0.11, expect a harmless peer warning until its next release.
|
|
136
136
|
|
|
137
137
|
```diff
|
|
138
138
|
-import { useJanus } from '@softistx/janus-graphql';
|
|
@@ -217,9 +217,10 @@ GraphiQL comes from `@graxia/graphiql`, a required peer; `ide`, `graphiql` and
|
|
|
217
217
|
`@graxia/core` (or a `GraphQLError`) for what a client may read.
|
|
218
218
|
- `extensions.http.status` and `extensions.http.headers` on an error set the
|
|
219
219
|
HTTP response again, as under Yoga (`@graxia/core` 0.10, graxia#147), for a
|
|
220
|
-
single operation answered as plain JSON
|
|
221
|
-
its
|
|
222
|
-
|
|
220
|
+
single operation answered as plain JSON. The first event of a subscription
|
|
221
|
+
refused before its stream opens honours it too, from `@graxia/core` 0.11.0:
|
|
222
|
+
the answer is an event-stream response carrying the status and headers;
|
|
223
|
+
`spec: true` drops the status there, as in Yoga. `errorHttp: false` turns it off:
|
|
223
224
|
the media type decides and `extensions` are untouched. The app's layers still
|
|
224
225
|
answer an auth error before.
|
|
225
226
|
- Server code reading `error.extensions['http']` needs index access once
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alxia/graphql",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
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.11.0",
|
|
56
|
+
"@graxia/envelop": "^0.1.5",
|
|
57
|
+
"@graxia/graphiql": "^0.2.5",
|
|
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",
|
|
67
|
+
"@graxia/core": "^0.10.0 || ^0.11.0",
|
|
68
68
|
"@graxia/graphiql": "^0.2.4"
|
|
69
69
|
}
|
|
70
70
|
}
|