@graphql-hive/router-query-planner 0.0.50 → 0.0.52

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/index.d.ts CHANGED
@@ -22,7 +22,6 @@ export type PlanNode =
22
22
  | SequenceNode
23
23
  | ParallelNode
24
24
  | FlattenNode
25
- | ConditionNode
26
25
  | SubscriptionNode
27
26
  | DeferNode;
28
27
 
@@ -36,6 +35,16 @@ export interface FetchNode {
36
35
  requires?: RequiresSelection[];
37
36
  inputRewrites?: InputRewrite[];
38
37
  outputRewrites?: OutputRewrite[];
38
+ contextRewrites?: KeyRenamer[];
39
+ contextVariables?: string[];
40
+ /** The fetch runs when any of these holds, always when missing. */
41
+ runIf?: ConditionGroup[];
42
+ }
43
+
44
+ /** Holds when every `includeIf` variable is `true` and no `skipIf` one is. */
45
+ export interface ConditionGroup {
46
+ includeIf?: string[];
47
+ skipIf?: string[];
39
48
  }
40
49
 
41
50
  export interface BatchFetchNode {
@@ -59,6 +68,8 @@ export interface EntityBatchAlias {
59
68
  requires: RequiresSelection[];
60
69
  inputRewrites?: InputRewrite[];
61
70
  outputRewrites?: OutputRewrite[];
71
+ contextRewrites?: KeyRenamer[];
72
+ contextVariables?: string[];
62
73
  }
63
74
 
64
75
  export interface SubscriptionNode {
@@ -67,6 +78,7 @@ export interface SubscriptionNode {
67
78
  }
68
79
 
69
80
  export type FetchNodePathSegment =
81
+ | "Parent"
70
82
  | { TypenameEquals: string[] }
71
83
  | { Key: string };
72
84
 
@@ -135,13 +147,6 @@ export interface FlattenNode {
135
147
  node: PlanNode;
136
148
  }
137
149
 
138
- export interface ConditionNode {
139
- kind: "Condition";
140
- condition: string;
141
- ifClause?: PlanNode;
142
- elseClause?: PlanNode;
143
- }
144
-
145
150
  export interface DeferNode {
146
151
  kind: "Defer";
147
152
  primary: DeferPrimary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-hive/router-query-planner",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -55,6 +55,6 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/node": "26.6.5",
58
- "@napi-rs/cli": "3.10.8"
58
+ "@napi-rs/cli": "3.10.9"
59
59
  }
60
60
  }