@loradb/lora-graphql 0.25.2 → 0.25.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 +8 -5
- package/dist/cli.js +2 -2
- package/dist/compile/context.d.ts +7 -0
- package/dist/{diff-BZZNZs76.js → diff-CuWVkan8.js} +2 -2
- package/dist/{diff-BZZNZs76.js.map → diff-CuWVkan8.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{lora-graphql-RvZQdHNA.js → lora-graphql-BWLKVLr0.js} +1672 -1592
- package/dist/lora-graphql-BWLKVLr0.js.map +1 -0
- package/dist/model/build/authorization.d.ts +3 -1
- package/dist/model/desugar.d.ts +10 -0
- package/dist/testing.js +1 -1
- package/package.json +2 -2
- package/dist/lora-graphql-RvZQdHNA.js.map +0 -1
|
@@ -18,7 +18,9 @@ export declare const PROPERTY_OPS: Set<AuthOperation>;
|
|
|
18
18
|
/**
|
|
19
19
|
* Whether a request without a token could pass the rule: some branch
|
|
20
20
|
* reads no claim. A claim read without a token denies its branch (and
|
|
21
|
-
* the whole rule under NOT), so those branches never pass.
|
|
21
|
+
* the whole rule under NOT), so those branches never pass. An `isViewer`
|
|
22
|
+
* test is the exception: without a token it is false for every node (see
|
|
23
|
+
* `VIEWER_TEST`), so under `none`, `NOT` or `all` it can pass.
|
|
22
24
|
*/
|
|
23
25
|
export declare function passableWithoutClaims(where: unknown): boolean;
|
|
24
26
|
export declare function claimsOnlyViolations(where: unknown, path?: string): string[];
|
package/dist/model/desugar.d.ts
CHANGED
|
@@ -36,6 +36,16 @@ export interface DesugarContext {
|
|
|
36
36
|
member?: NodeType;
|
|
37
37
|
at: (message: string) => void;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Marks the operator object `isViewer` expands to (`{ eq: "$jwt.<claim>" }`
|
|
41
|
+
* on the viewer field). With a claim to compare, it compiles like the
|
|
42
|
+
* hand-written test. Without one (a signed-out caller, or a token without
|
|
43
|
+
* the claim) there is no viewer, so no node is the viewer: the test is
|
|
44
|
+
* false for every node, rather than unknown like a test of a missing claim.
|
|
45
|
+
* `none` and `NOT … some` then hold, while `some` and a bare `isViewer`
|
|
46
|
+
* fail. A symbol key, so operator walks (`Object.entries`) never see it.
|
|
47
|
+
*/
|
|
48
|
+
export declare const VIEWER_TEST: unique symbol;
|
|
39
49
|
/**
|
|
40
50
|
* A rule's where, sugar expanded. `owner` is the type the rule's `node`
|
|
41
51
|
* part tests (undefined on relationship properties: claims only).
|
package/dist/testing.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loradb/lora-graphql",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.3",
|
|
4
4
|
"description": "Schema-first GraphQL for LoraDB: one annotated SDL becomes an executable, index-aware GraphQL API that compiles every operation to a single Cypher statement.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"packageManager": "yarn@4.5.1",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"bench:load": "node bench/load/main.mjs"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@loradb/lora-node": "^0.25.
|
|
68
|
+
"@loradb/lora-node": "^0.25.3",
|
|
69
69
|
"graphql": "^16.8.0 || ^17.0.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|