@softistx/alxia-graphql 0.20.2 → 0.21.0

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 CHANGED
@@ -15,7 +15,7 @@ bun add -d typescript
15
15
  bun add @softistx/graxia-envelop @envelop/depth-limit # install yourself to use Envelop plugins
16
16
  ```
17
17
 
18
- `@softistx/graxia` (`^0.16.0 || ^0.17.0`), `@softistx/graxia-graphiql` (`^0.4.0`) and `graphql` (17.1 or later) are peers:
18
+ `@softistx/graxia` (`^0.18.0 || ^0.19.0 || ^0.20.0`), `@softistx/graxia-graphiql` (`^0.4.0 || ^0.5.0`) and `graphql` (17.1 or later) are peers:
19
19
  the package declares no dependency. `@softistx/graxia-graphiql` serves the IDE and is
20
20
  required. CSRF protection is graxia's default (on): a `GET` needs one of the
21
21
  `x-graphql-csrf`, `graphql-require-preflight`, `apollo-require-preflight` or
@@ -25,7 +25,8 @@ required. CSRF protection is graxia's default (on): a `GET` needs one of the
25
25
 
26
26
  | `@softistx/graxia` | `@softistx/graxia-graphiql` |
27
27
  | --- | --- |
28
- | 0.15 | 0.3.0 |
28
+ | 0.18, 0.19 | 0.4 |
29
+ | 0.20 | 0.5 |
29
30
 
30
31
  Before the move to the `@softistx` scope, the packages were `@graxia/core` and `@graxia/graphiql`:
31
32
  core 0.10 to 0.14 paired with graphiql 0.2.4 to 0.2.8 (one graphiql patch per core minor).
package/docs/guide/ide.md CHANGED
@@ -77,12 +77,16 @@ Its other options are listed in the `@softistx/graxia-graphiql` documentation.
77
77
  The page serves GraphiQL's script and stylesheet itself, from the endpoint
78
78
  (`?graphiql-asset=<file>`): nothing loads from a third-party host. The
79
79
  response carries a strict `Content-Security-Policy` that lets those files
80
- alone load, runs no worker and lets no one frame the page:
80
+ alone load, lets no one frame the page and lets same-origin workers run
81
+ (`worker-src 'self'`, which GraphiQL 6's editors need). The policy of
82
+ `@softistx/graxia-graphiql` 0.5:
81
83
 
82
84
  ```text
83
- default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; worker-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
85
+ default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; worker-src 'self'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
84
86
  ```
85
87
 
88
+ `@softistx/graxia-graphiql` 0.4 sent `worker-src 'none'` instead and ran no worker.
89
+
86
90
  ## Apollo Sandbox
87
91
 
88
92
  `ide: 'apollo-sandbox'` serves a page embedding Apollo Sandbox, pointed at
@@ -26,16 +26,17 @@ bun add graphql@^17.1.0
26
26
 
27
27
  | Before | After |
28
28
  | --- | --- |
29
- | `graphql-yoga` | `@softistx/graxia` `^0.16.0 \|\| ^0.17.0` (0.10 sets the HTTP status from errors again) |
29
+ | `graphql-yoga` | `@softistx/graxia` `^0.18.0 \|\| ^0.19.0 \|\| ^0.20.0` (0.10 sets the HTTP status from errors again) |
30
30
  | `graphql-ws` (for `ws`) | nothing: graxia speaks `graphql-transport-ws` |
31
- | bundled GraphiQL of Yoga | `@softistx/graxia-graphiql` `^0.4.0` (required) |
31
+ | bundled GraphiQL of Yoga | `@softistx/graxia-graphiql` `^0.4.0 \|\| ^0.5.0` (required) |
32
32
  | Envelop plugins | not a peer: install `@softistx/graxia-envelop` yourself to use Envelop plugins |
33
33
 
34
34
  `@softistx/graxia-graphiql` peers on exactly one core minor, so install the one that matches:
35
35
 
36
36
  | `@softistx/graxia` | `@softistx/graxia-graphiql` |
37
37
  | --- | --- |
38
- | 0.16 | 0.4.0 |
38
+ | 0.18, 0.19 | 0.4 |
39
+ | 0.20 | 0.5 |
39
40
 
40
41
  Before the move to the `@softistx` scope, the packages were `@graxia/core` and `@graxia/graphiql`:
41
42
  core 0.10 to 0.14 paired with graphiql 0.2.4 to 0.2.8 (one graphiql patch per core minor).
@@ -883,21 +883,23 @@ subscribe: () => boundedStream(source, { idleMs: 90_000, totalMs: 600_000, check
883
883
  other than the one installed, or the install holds two copies of core.
884
884
 
885
885
  **Why:** each `@softistx/graxia-graphiql` release peers on exactly one core minor
886
- (0.4.0 on core 0.16; under the former `@graxia/*` names, 0.2.4 on core 0.10 up
886
+ (0.4 on core 0.18 or 0.19, 0.5 on core 0.20; under the former `@graxia/*` names, 0.2.4 on core 0.10 up
887
887
  to 0.2.8 on 0.14).
888
888
 
889
889
  **Fix:** install the graphiql that matches your core, for example
890
- `bun add @softistx/graxia-graphiql@^0.4.0` with `@softistx/graxia` 0.16.
890
+ `bun add @softistx/graxia-graphiql@^0.5.0` with `@softistx/graxia` 0.20 (or `^0.4.0` with 0.18 or 0.19).
891
891
 
892
892
  ### The IDE page is blank
893
893
 
894
894
  **When:** GraphiQL or Apollo Sandbox loads an empty page, and the browser
895
895
  console reports scripts refused by the `Content-Security-Policy`.
896
896
 
897
- **Why:** the endpoint sends the IDE with a policy that lets it load its
898
- scripts from `unpkg.com` or Apollo's CDN. A middleware of the app that sets its
897
+ **Why:** the endpoint sends the IDE with a policy that lets it load its own
898
+ files (GraphiQL serves them itself). A middleware of the app that sets its
899
899
  own `Content-Security-Policy` on every response replaces it.
900
900
  `@softistx/alxia-secure-headers` does not: it keeps a policy a response already has.
901
+ With `@softistx/graxia-graphiql` 0.5, a policy of your own that replaces it must
902
+ allow `worker-src 'self'`, or the editors lose completion and validation.
901
903
 
902
904
  **Fix:** set the app's policy only where none is set
903
905
  ([With `@softistx/alxia-secure-headers`](guide/ide.md#with-softistxalxia-secure-headers)):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softistx/alxia-graphql",
3
- "version": "0.20.2",
3
+ "version": "0.21.0",
4
4
  "description": "GraphQL for alxia served by @softistx/graxia: 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
  "@softistx/alxia-telemetry": "^0.10.0",
53
53
  "@envelop/core": "^6.0.1",
54
54
  "@envelop/depth-limit": "^7.2.1",
55
- "@softistx/graxia": "^0.18.0",
55
+ "@softistx/graxia": "^0.20.1",
56
56
  "@softistx/graxia-envelop": "^0.2.2",
57
- "@softistx/graxia-graphiql": "^0.4.1",
57
+ "@softistx/graxia-graphiql": "^0.5.1",
58
58
  "@softistx/telemetry": "^0.5.0",
59
59
  "@types/bun": "^1.4.5",
60
60
  "dataloader": "^2.2.3",
@@ -64,7 +64,7 @@
64
64
  "@softistx/alxia": "^0.28.0",
65
65
  "graphql": "^17.1.0",
66
66
  "typescript": "^6.0.3 || ^7.0.0",
67
- "@softistx/graxia": "^0.16.0 || ^0.17.0 || ^0.18.0",
68
- "@softistx/graxia-graphiql": "^0.4.0"
67
+ "@softistx/graxia": "^0.18.0 || ^0.19.0 || ^0.20.0",
68
+ "@softistx/graxia-graphiql": "^0.4.0 || ^0.5.0"
69
69
  }
70
70
  }