@graphql-hive/router-query-planner 0.0.9 → 0.0.16
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/dist/hive_router_query_planner.darwin-arm64.node +0 -0
- package/dist/hive_router_query_planner.darwin-x64.node +0 -0
- package/dist/hive_router_query_planner.linux-arm64-gnu.node +0 -0
- package/dist/hive_router_query_planner.linux-x64-gnu.node +0 -0
- package/{index.d.ts → dist/index.d.ts} +36 -4
- package/package.json +16 -15
- package/hive_router_query_planner.darwin-arm64.node +0 -0
- package/hive_router_query_planner.darwin-x64.node +0 -0
- package/hive_router_query_planner.linux-arm64-gnu.node +0 -0
- package/hive_router_query_planner.linux-x64-gnu.node +0 -0
- /package/{index.cjs → dist/index.cjs} +0 -0
- /package/{index.js → dist/index.js} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export declare class QueryPlanner {
|
|
4
|
+
consumerSchema: string
|
|
5
|
+
overrideLabels: Array<string>
|
|
6
|
+
overridePercentages: Array<number>
|
|
4
7
|
constructor(supergraphSdl: string)
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
plan(query: string, operationName: string | undefined | null, activeLabels: Set<string>, percentageValue: number, signal?: AbortSignal | undefined | null): QueryPlan
|
|
9
|
+
planAsync(query: string, operationName: string | undefined | null, activeLabels: Set<string>, percentageValue: number, signal?: AbortSignal | undefined | null): Promise<QueryPlan>
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
export interface QueryPlan {
|
|
@@ -13,6 +16,7 @@ export interface QueryPlan {
|
|
|
13
16
|
|
|
14
17
|
export type PlanNode =
|
|
15
18
|
| FetchNode
|
|
19
|
+
| BatchFetchNode
|
|
16
20
|
| SequenceNode
|
|
17
21
|
| ParallelNode
|
|
18
22
|
| FlattenNode
|
|
@@ -32,12 +36,37 @@ export interface FetchNode {
|
|
|
32
36
|
outputRewrites?: OutputRewrite[];
|
|
33
37
|
}
|
|
34
38
|
|
|
39
|
+
export interface BatchFetchNode {
|
|
40
|
+
kind: "BatchFetch";
|
|
41
|
+
serviceName: string;
|
|
42
|
+
variableUsages?: string[];
|
|
43
|
+
operationKind?: "query" | "mutation" | "subscription";
|
|
44
|
+
operationName?: string;
|
|
45
|
+
operation: string;
|
|
46
|
+
entityBatch: EntityBatch;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface EntityBatch {
|
|
50
|
+
aliases: EntityBatchAlias[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface EntityBatchAlias {
|
|
54
|
+
alias: string;
|
|
55
|
+
representationsVariableName: string;
|
|
56
|
+
paths: FlattenNodePathSegment[][];
|
|
57
|
+
requires: RequiresSelection[];
|
|
58
|
+
inputRewrites?: InputRewrite[];
|
|
59
|
+
outputRewrites?: OutputRewrite[];
|
|
60
|
+
}
|
|
61
|
+
|
|
35
62
|
export interface SubscriptionNode {
|
|
36
63
|
kind: "Subscription";
|
|
37
64
|
primary: PlanNode;
|
|
38
65
|
}
|
|
39
66
|
|
|
40
|
-
export type FetchNodePathSegment =
|
|
67
|
+
export type FetchNodePathSegment =
|
|
68
|
+
| { TypenameEquals: string[] }
|
|
69
|
+
| { Key: string };
|
|
41
70
|
|
|
42
71
|
export type FetchRewrite =
|
|
43
72
|
| { ValueSetter: ValueSetter }
|
|
@@ -93,7 +122,10 @@ export interface ParallelNode {
|
|
|
93
122
|
nodes: PlanNode[];
|
|
94
123
|
}
|
|
95
124
|
|
|
96
|
-
export type FlattenNodePathSegment =
|
|
125
|
+
export type FlattenNodePathSegment =
|
|
126
|
+
| { Field: string }
|
|
127
|
+
| { TypeCondition: string[] }
|
|
128
|
+
| "@";
|
|
97
129
|
|
|
98
130
|
export interface FlattenNode {
|
|
99
131
|
kind: "Flatten";
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-hive/router-query-planner",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"README.md",
|
|
9
|
-
"index.js",
|
|
10
|
-
"index.cjs",
|
|
11
|
-
"index.d.ts",
|
|
12
|
-
"
|
|
9
|
+
"dist/index.js",
|
|
10
|
+
"dist/index.cjs",
|
|
11
|
+
"dist/index.d.ts",
|
|
12
|
+
"dist/*.node"
|
|
13
13
|
],
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"import": "./index.js",
|
|
17
|
-
"require": "./index.cjs",
|
|
18
|
-
"types": "./index.d.ts"
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
19
|
},
|
|
20
20
|
"./package.json": "./package.json"
|
|
21
21
|
},
|
|
@@ -48,12 +48,13 @@
|
|
|
48
48
|
"bun": "^1"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
|
-
"build": "RELEASE=true node build.
|
|
52
|
-
"build:debug": "node build.
|
|
53
|
-
"test": "node tests",
|
|
54
|
-
"test:updatesnaps": "node --test-update-snapshots tests"
|
|
51
|
+
"build": "RELEASE=true node scripts/build.ts",
|
|
52
|
+
"build:debug": "node scripts/build.ts",
|
|
53
|
+
"test": "node tests/index.ts",
|
|
54
|
+
"test:updatesnaps": "node --test-update-snapshots tests/index.ts"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@
|
|
57
|
+
"@types/node": "25.5.0",
|
|
58
|
+
"@napi-rs/cli": "3.5.1"
|
|
58
59
|
}
|
|
59
60
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|