@pothos/selection-mapper 0.1.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/.swcrc +10 -0
- package/LICENSE +6 -0
- package/README.md +92 -0
- package/dts/adapter.d.ts +74 -0
- package/dts/adapter.d.ts.map +1 -0
- package/dts/deep-equal.d.ts +7 -0
- package/dts/deep-equal.d.ts.map +1 -0
- package/dts/index.d.ts +13 -0
- package/dts/index.d.ts.map +1 -0
- package/dts/loader-map.d.ts +63 -0
- package/dts/loader-map.d.ts.map +1 -0
- package/dts/matches.d.ts +113 -0
- package/dts/matches.d.ts.map +1 -0
- package/dts/node.d.ts +85 -0
- package/dts/node.d.ts.map +1 -0
- package/dts/plan.d.ts +176 -0
- package/dts/plan.d.ts.map +1 -0
- package/dts/types.d.ts +97 -0
- package/dts/types.d.ts.map +1 -0
- package/dts/walk.d.ts +24 -0
- package/dts/walk.d.ts.map +1 -0
- package/esm/adapter.d.ts +74 -0
- package/esm/adapter.d.ts.map +1 -0
- package/esm/adapter.js +47 -0
- package/esm/adapter.js.map +1 -0
- package/esm/deep-equal.d.ts +7 -0
- package/esm/deep-equal.d.ts.map +1 -0
- package/esm/deep-equal.js +50 -0
- package/esm/deep-equal.js.map +1 -0
- package/esm/index.d.ts +13 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +12 -0
- package/esm/index.js.map +1 -0
- package/esm/loader-map.d.ts +63 -0
- package/esm/loader-map.d.ts.map +1 -0
- package/esm/loader-map.js +197 -0
- package/esm/loader-map.js.map +1 -0
- package/esm/matches.d.ts +113 -0
- package/esm/matches.d.ts.map +1 -0
- package/esm/matches.js +419 -0
- package/esm/matches.js.map +1 -0
- package/esm/node.d.ts +85 -0
- package/esm/node.d.ts.map +1 -0
- package/esm/node.js +232 -0
- package/esm/node.js.map +1 -0
- package/esm/package.json +3 -0
- package/esm/plan.d.ts +176 -0
- package/esm/plan.d.ts.map +1 -0
- package/esm/plan.js +339 -0
- package/esm/plan.js.map +1 -0
- package/esm/types.d.ts +97 -0
- package/esm/types.d.ts.map +1 -0
- package/esm/types.js +10 -0
- package/esm/types.js.map +1 -0
- package/esm/walk.d.ts +24 -0
- package/esm/walk.d.ts.map +1 -0
- package/esm/walk.js +442 -0
- package/esm/walk.js.map +1 -0
- package/lib/adapter.js +43 -0
- package/lib/adapter.js.map +1 -0
- package/lib/deep-equal.js +60 -0
- package/lib/deep-equal.js.map +1 -0
- package/lib/index.js +57 -0
- package/lib/index.js.map +1 -0
- package/lib/loader-map.js +209 -0
- package/lib/loader-map.js.map +1 -0
- package/lib/matches.js +427 -0
- package/lib/matches.js.map +1 -0
- package/lib/node.js +245 -0
- package/lib/node.js.map +1 -0
- package/lib/plan.js +349 -0
- package/lib/plan.js.map +1 -0
- package/lib/types.js +9 -0
- package/lib/types.js.map +1 -0
- package/lib/walk.js +455 -0
- package/lib/walk.js.map +1 -0
- package/package.json +55 -0
- package/src/adapter.ts +96 -0
- package/src/deep-equal.ts +67 -0
- package/src/index.ts +32 -0
- package/src/loader-map.ts +287 -0
- package/src/matches.ts +681 -0
- package/src/node.ts +327 -0
- package/src/plan.ts +454 -0
- package/src/types.ts +123 -0
- package/src/walk.ts +696 -0
package/esm/node.js
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The node one root accumulates into — a model, its arguments, its columns, its relations and its
|
|
3
|
+
* computed values — and the merge, compare and conflict rules over a tree of them, shared by every
|
|
4
|
+
* adapter whose query is a tree of that shape.
|
|
5
|
+
*
|
|
6
|
+
* A subclass supplies the only format-specific parts: `visitQuery`, the key loop of the ORM's own
|
|
7
|
+
* query, and `toQuery`, the node written back. The traversal never reaches in here — it drives the
|
|
8
|
+
* `Adapter` contract, of which this implements everything but those two.
|
|
9
|
+
*/ import { isThenable, PothosValidationError } from '@pothos/core';
|
|
10
|
+
import { Adapter } from './adapter.js';
|
|
11
|
+
import { deepEqual } from './deep-equal.js';
|
|
12
|
+
export function createNode(model) {
|
|
13
|
+
return {
|
|
14
|
+
model,
|
|
15
|
+
args: {},
|
|
16
|
+
columns: new Set(),
|
|
17
|
+
relations: new Map(),
|
|
18
|
+
computed: new Map()
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The only way to obtain a child node: get the relation's node or create it. `value` is what the
|
|
23
|
+
* map holds for the relation, checked here because a thenable is an un-awaited
|
|
24
|
+
* `nestedSelection()` that would otherwise be spread as an empty object.
|
|
25
|
+
*/ export function relation(node, name, model, value) {
|
|
26
|
+
if (isThenable(value)) {
|
|
27
|
+
throw new PothosValidationError(`Relation "${name}" was given a promise. Await nestedSelection() (or a helper built on it, such as getQuery) inside an async selection function.`);
|
|
28
|
+
}
|
|
29
|
+
let child = node.relations.get(name);
|
|
30
|
+
if (!child) {
|
|
31
|
+
child = createNode(model);
|
|
32
|
+
node.relations.set(name, child);
|
|
33
|
+
}
|
|
34
|
+
return child;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The adapter the prisma and drizzle adapters extend: the node tree above with every merge,
|
|
38
|
+
* compare and conflict rule this package owns. A subclass answers `visitQuery` and `toQuery`, plus
|
|
39
|
+
* the three translation members of `Adapter`.
|
|
40
|
+
*/ export class NodeAdapter extends Adapter {
|
|
41
|
+
/**
|
|
42
|
+
* One merger and one merge check per adapter, re-used down the tree: each saves and restores
|
|
43
|
+
* the node it is at rather than allocating a visitor per level, so a merge allocates only what
|
|
44
|
+
* the subclass's own `visitQuery` does. They cannot be this object — a lenient merge runs a
|
|
45
|
+
* check inside itself, so one `this` could not hold both cursors.
|
|
46
|
+
*/ merger = new Merger(this);
|
|
47
|
+
mergeCheck = new MergeCheck(this);
|
|
48
|
+
createNode(model) {
|
|
49
|
+
return createNode(model);
|
|
50
|
+
}
|
|
51
|
+
mergeQuery(node, query, options) {
|
|
52
|
+
this.merger.run(node, query, options);
|
|
53
|
+
}
|
|
54
|
+
canMergeQuery(node, query, options) {
|
|
55
|
+
return this.mergeCheck.run(node, query, options);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Whether `value` cannot join `computed` under `name`. A `deepEqual` against the value already
|
|
59
|
+
* there, which is what an adapter whose computed values are plain values wants; drizzle
|
|
60
|
+
* compares its `extras` by identity, and prisma overrides it for the `_count: true` wildcard.
|
|
61
|
+
*/ computedConflicts(computed, name, value) {
|
|
62
|
+
return computed.has(name) && !deepEqual(computed.get(name), value);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The first top-level key of `query` that conflicts with `node`. Top-level only, so the error
|
|
66
|
+
* names the key a user wrote rather than something nested beneath it.
|
|
67
|
+
*/ firstConflict(node, query) {
|
|
68
|
+
let found;
|
|
69
|
+
this.visitQuery(query, node.model, {
|
|
70
|
+
column () {},
|
|
71
|
+
allColumns () {},
|
|
72
|
+
args () {},
|
|
73
|
+
relation: (name, _model, nested)=>{
|
|
74
|
+
const child = node.relations.get(name);
|
|
75
|
+
if (!found && child && !new MergeCheck(this).run(child, nested)) {
|
|
76
|
+
found = {
|
|
77
|
+
kind: 'relation',
|
|
78
|
+
name
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
computed: (name, value, kind = 'extra')=>{
|
|
83
|
+
if (!found && this.computedConflicts(node.computed, name, value)) {
|
|
84
|
+
found = {
|
|
85
|
+
kind,
|
|
86
|
+
name
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return found;
|
|
92
|
+
}
|
|
93
|
+
/** Node to node, without the serialize/merge round trip. */ mergeNode(into, from) {
|
|
94
|
+
if (from.columns === null) {
|
|
95
|
+
into.columns = null;
|
|
96
|
+
} else if (into.columns) {
|
|
97
|
+
for (const column of from.columns){
|
|
98
|
+
into.columns.add(column);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (hasKeys(from.args)) {
|
|
102
|
+
into.args = from.args;
|
|
103
|
+
}
|
|
104
|
+
for (const [name, value] of from.computed){
|
|
105
|
+
into.computed.set(name, value);
|
|
106
|
+
}
|
|
107
|
+
for (const [name, child] of from.relations){
|
|
108
|
+
this.mergeNode(relation(into, name, child.model, undefined), child);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/** `canMergeQuery` node to node, likewise. */ canMergeNode(into, from) {
|
|
112
|
+
if (!deepEqual(into.args, from.args)) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
for (const [name, value] of from.computed){
|
|
116
|
+
if (this.computedConflicts(into.computed, name, value)) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
for (const [name, child] of from.relations){
|
|
121
|
+
const existing = into.relations.get(name);
|
|
122
|
+
if (existing && !this.canMergeNode(existing, child)) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** One query folded into a node, in place. */ class Merger {
|
|
130
|
+
adapter;
|
|
131
|
+
node;
|
|
132
|
+
/** A relation query must add no columns; the plan beneath it adds the ones it needs. */ asQuery = false;
|
|
133
|
+
/** A conflicting relation or computed value is left out, not merged. Top level only. */ lenient = false;
|
|
134
|
+
constructor(adapter){
|
|
135
|
+
this.adapter = adapter;
|
|
136
|
+
}
|
|
137
|
+
run(node, query, options) {
|
|
138
|
+
this.node = node;
|
|
139
|
+
this.asQuery = options?.asQuery ?? false;
|
|
140
|
+
this.lenient = options?.lenient ?? false;
|
|
141
|
+
this.adapter.visitQuery(query, node.model, this);
|
|
142
|
+
}
|
|
143
|
+
column(name) {
|
|
144
|
+
this.node.columns?.add(name);
|
|
145
|
+
}
|
|
146
|
+
allColumns() {
|
|
147
|
+
if (!this.asQuery) {
|
|
148
|
+
this.node.columns = null;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
relation(name, model, query) {
|
|
152
|
+
const parent = this.node;
|
|
153
|
+
if (this.lenient) {
|
|
154
|
+
const existing = parent.relations.get(name);
|
|
155
|
+
// The subtree is checked whole, so once the relation is accepted it merges whole.
|
|
156
|
+
if (existing && !new MergeCheck(this.adapter).run(existing, query)) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const child = relation(parent, name, model, query);
|
|
161
|
+
const { asQuery, lenient } = this;
|
|
162
|
+
this.node = child;
|
|
163
|
+
this.asQuery = false;
|
|
164
|
+
this.lenient = false;
|
|
165
|
+
this.adapter.visitQuery(query, model, this);
|
|
166
|
+
this.node = parent;
|
|
167
|
+
this.asQuery = asQuery;
|
|
168
|
+
this.lenient = lenient;
|
|
169
|
+
}
|
|
170
|
+
computed(name, value) {
|
|
171
|
+
if (this.lenient && this.adapter.computedConflicts(this.node.computed, name, value)) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
this.node.computed.set(name, value);
|
|
175
|
+
}
|
|
176
|
+
args(args) {
|
|
177
|
+
if (hasKeys(args)) {
|
|
178
|
+
this.node.args = args;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Whether a query merges into a node without changing what is already selected. Runs the whole
|
|
184
|
+
* query even after the first failure (a rejection is the rare path) so a `visitQuery` stays a
|
|
185
|
+
* plain loop.
|
|
186
|
+
*/ class MergeCheck {
|
|
187
|
+
adapter;
|
|
188
|
+
node;
|
|
189
|
+
ignoreArgs = false;
|
|
190
|
+
ok = true;
|
|
191
|
+
constructor(adapter){
|
|
192
|
+
this.adapter = adapter;
|
|
193
|
+
}
|
|
194
|
+
run(node, query, options) {
|
|
195
|
+
this.node = node;
|
|
196
|
+
this.ignoreArgs = options?.ignoreArgs ?? false;
|
|
197
|
+
this.ok = true;
|
|
198
|
+
this.adapter.visitQuery(query, node.model, this);
|
|
199
|
+
return this.ok;
|
|
200
|
+
}
|
|
201
|
+
column() {}
|
|
202
|
+
allColumns() {}
|
|
203
|
+
relation(name, model, query) {
|
|
204
|
+
const child = this.node.relations.get(name);
|
|
205
|
+
if (!this.ok || !child) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const parent = this.node;
|
|
209
|
+
const { ignoreArgs } = this;
|
|
210
|
+
// Below the top, a relation's own arguments are part of what is already selected.
|
|
211
|
+
this.node = child;
|
|
212
|
+
this.ignoreArgs = false;
|
|
213
|
+
this.adapter.visitQuery(query, model, this);
|
|
214
|
+
this.node = parent;
|
|
215
|
+
this.ignoreArgs = ignoreArgs;
|
|
216
|
+
}
|
|
217
|
+
computed(name, value) {
|
|
218
|
+
if (this.ok && this.adapter.computedConflicts(this.node.computed, name, value)) {
|
|
219
|
+
this.ok = false;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
args(args) {
|
|
223
|
+
if (this.ok && !this.ignoreArgs && !deepEqual(this.node.args, args)) {
|
|
224
|
+
this.ok = false;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/** Whether an object has any own enumerable key. */ function hasKeys(value) {
|
|
229
|
+
return Object.keys(value).length > 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
//# sourceMappingURL=node.js.map
|
package/esm/node.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/node.ts"],"names":["isThenable","PothosValidationError","Adapter","deepEqual","createNode","model","args","columns","Set","relations","Map","computed","relation","node","name","value","child","get","set","NodeAdapter","merger","Merger","mergeCheck","MergeCheck","mergeQuery","query","options","run","canMergeQuery","computedConflicts","has","firstConflict","found","visitQuery","column","allColumns","_model","nested","kind","mergeNode","into","from","add","hasKeys","undefined","canMergeNode","existing","asQuery","lenient","adapter","parent","ignoreArgs","ok","Object","keys","length"],"mappings":"AAAA;;;;;;;;CAQC,GACD,SAASA,UAAU,EAAEC,qBAAqB,QAAQ,eAAe;AACjE,SAASC,OAAO,QAAuB,eAAe;AACtD,SAASC,SAAS,QAAQ,kBAAkB;AAgB5C,O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
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { type GraphQLNamedType, type GraphQLResolveInfo } from 'graphql';
|
|
2
|
+
import type { Adapter, NodeBase } from './adapter.js';
|
|
3
|
+
import { type Mapping, type Mappings } from './loader-map.js';
|
|
4
|
+
import type { Node } from './node.js';
|
|
5
|
+
import type { EntryOptions, Position, WalkedType } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* One merge a traversal collected, in the order it happened: a type's selection, a same-model
|
|
8
|
+
* variant's, a nested selection's relation query, or a field's. A play folds the list into a
|
|
9
|
+
* node; nothing is merged, accepted or rejected before then.
|
|
10
|
+
*
|
|
11
|
+
* A record holds its query by reference, so a select function that mutates the query it returned
|
|
12
|
+
* after returning it changes what a later play builds — a bug in the select function. Nothing
|
|
13
|
+
* copies it: a query is opaque to this package, which could only copy one by round-tripping it
|
|
14
|
+
* through the adapter on every field.
|
|
15
|
+
*/
|
|
16
|
+
export type RootMerge<Query> = {
|
|
17
|
+
kind: 'type';
|
|
18
|
+
query: Query;
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'query';
|
|
21
|
+
query: Query;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'variant';
|
|
24
|
+
type: WalkedType;
|
|
25
|
+
variant: WalkedType;
|
|
26
|
+
query: Query;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'field';
|
|
29
|
+
key: string;
|
|
30
|
+
alias: string;
|
|
31
|
+
query: Query;
|
|
32
|
+
mapping: Mapping;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A plan played: the node its merges built and the mappings the accepted merges recorded. A play
|
|
36
|
+
* owns its node, so a caller may merge into one without disturbing the plan or another play.
|
|
37
|
+
*/
|
|
38
|
+
export interface PlayedPlan<Model, Query, NodeType extends NodeBase<Model> = Node<Model>> {
|
|
39
|
+
plan: Plan<Model, Query, NodeType>;
|
|
40
|
+
root: NodeType;
|
|
41
|
+
mappings: Mappings;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* What a plan takes from whatever created it: an entry point's options, or the plan it hangs
|
|
45
|
+
* beneath. A parent plan satisfies this, so a nested plan is created from its parent directly
|
|
46
|
+
* with nothing allocated to carry the values across.
|
|
47
|
+
*/
|
|
48
|
+
export interface PlanSource {
|
|
49
|
+
context: object;
|
|
50
|
+
info: GraphQLResolveInfo;
|
|
51
|
+
/** Whether a fragment under `@defer` is walked; defaults to the adapter's own setting. */
|
|
52
|
+
skipDeferredFragments?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export declare class Plan<Model, Query, NodeType extends NodeBase<Model> = Node<Model>> {
|
|
55
|
+
readonly adapter: Adapter<Model, Query, NodeType>;
|
|
56
|
+
readonly position?: Position | undefined;
|
|
57
|
+
/** Merged first by a play a caller gives no seed of its own. */
|
|
58
|
+
readonly initial?: Query | undefined;
|
|
59
|
+
readonly context: object;
|
|
60
|
+
readonly info: GraphQLResolveInfo;
|
|
61
|
+
readonly skipDeferredFragments: boolean;
|
|
62
|
+
/** What the plan loads. A node is created for it once per play. */
|
|
63
|
+
readonly model: Model;
|
|
64
|
+
/**
|
|
65
|
+
* The merges waiting on a user callback that returned a promise, in the order they were
|
|
66
|
+
* appended. Absent until the first one: a synchronous plan never creates a promise.
|
|
67
|
+
*/
|
|
68
|
+
pending?: Promise<void>;
|
|
69
|
+
/** The traversal's whole output: every merge it collected, in the order it collected them. */
|
|
70
|
+
private readonly merges;
|
|
71
|
+
/**
|
|
72
|
+
* The play `settle` ran, which a later play takes whole when the seed conflicts with none of
|
|
73
|
+
* it. Never handed out: a play that reuses it copies it into a node of its own.
|
|
74
|
+
*/
|
|
75
|
+
private played?;
|
|
76
|
+
/**
|
|
77
|
+
* The plan for the field `info` resolves, settled, or undefined when paths are given and
|
|
78
|
+
* nothing is selected under them. Declared synchronous: the result is a promise only when a
|
|
79
|
+
* select function returned one, and must then be awaited. The plan is handed out rather than
|
|
80
|
+
* played, so a plugin that owes a resolver a synchronous query builder settles this first and
|
|
81
|
+
* plays it behind the resolver's own selection with `plan.query(select)`.
|
|
82
|
+
*/
|
|
83
|
+
static fromInfo<Model, Query, NodeType extends NodeBase<Model> = Node<Model>>(adapter: Adapter<Model, Query, NodeType>, options: EntryOptions<Query>): Plan<Model, Query, NodeType> | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* The plan loading the field `info` resolves for its parent row, played. The loaded row
|
|
86
|
+
* replaces the parent the field resolver sees, so besides the field's own selection it
|
|
87
|
+
* carries the parent type's type-level selection. The field is what the row is loaded for, so
|
|
88
|
+
* it is merged first and a type-level relation whose arguments conflict with it is left out.
|
|
89
|
+
*/
|
|
90
|
+
static forParentRow<Model, Query, NodeType extends NodeBase<Model> = Node<Model>>(adapter: Adapter<Model, Query, NodeType>, context: object, info: GraphQLResolveInfo, skipDeferredFragments?: boolean): PlayedPlan<Model, Query, NodeType>;
|
|
91
|
+
/**
|
|
92
|
+
* `source` is an entry point's options for a root plan and the parent plan for a nested one,
|
|
93
|
+
* which is why `initial` is passed beside it: it belongs to the root alone and a nested plan
|
|
94
|
+
* must never inherit one. `position` is where the field this plan hangs beneath is, undefined
|
|
95
|
+
* when there is no field above the plan.
|
|
96
|
+
*/
|
|
97
|
+
constructor(adapter: Adapter<Model, Query, NodeType>, source: PlanSource, type: GraphQLNamedType, position?: Position | undefined,
|
|
98
|
+
/** Merged first by a play a caller gives no seed of its own. */
|
|
99
|
+
initial?: Query | undefined);
|
|
100
|
+
/**
|
|
101
|
+
* The plan beneath one nested selection: this plan's adapter, context, info and deferred
|
|
102
|
+
* setting, with merges of its own. It hangs beneath the field whose select function made it.
|
|
103
|
+
*/
|
|
104
|
+
nested(type: GraphQLNamedType, position: Position): Plan<Model, Query, NodeType>;
|
|
105
|
+
/** Appends one merge to the list a play folds. The traversal's only way to add to a plan. */
|
|
106
|
+
collect(merge: RootMerge<Query>): void;
|
|
107
|
+
/**
|
|
108
|
+
* The relation query of the nested selection this plan was made for. It takes the head of the
|
|
109
|
+
* list, so it is merged before the fields walked beneath it whether the callback that produced
|
|
110
|
+
* it answered at once or resolved after the walk. A nested plan has at most one.
|
|
111
|
+
*/
|
|
112
|
+
collectQuery(query: Query): void;
|
|
113
|
+
/**
|
|
114
|
+
* Appends the merge of `value` to the plan's pending chain. Only merges are chained, never user
|
|
115
|
+
* code, so a link can never append another and the chain needs no loop. Each link waits on the
|
|
116
|
+
* previous one, so async merges run in the order they were appended. Both promises get a
|
|
117
|
+
* handler at once, so a callback that rejects early is never an unhandled rejection.
|
|
118
|
+
*/
|
|
119
|
+
chain<T>(value: PromiseLike<T>, merge: (v: T) => void): void;
|
|
120
|
+
/**
|
|
121
|
+
* A plan that threw synchronously never reaches `finish`, so the merges it had already chained
|
|
122
|
+
* would reject unobserved once their callbacks settle. The throw is what the caller sees.
|
|
123
|
+
*/
|
|
124
|
+
abandon(): void;
|
|
125
|
+
/**
|
|
126
|
+
* The single exit of every entry point: `done`, a method of this plan, runs now when nothing is
|
|
127
|
+
* pending, else after every pending merge, in which case the result is a promise behind the
|
|
128
|
+
* declared synchronous type. Fixed arity, so the synchronous call allocates nothing.
|
|
129
|
+
*/
|
|
130
|
+
finish<R>(done: (this: this) => R): R;
|
|
131
|
+
finish<A, R>(done: (this: this, arg: A) => R, arg: A): R;
|
|
132
|
+
/**
|
|
133
|
+
* A fresh node with this plan's merges folded into it, and the mappings of the merges it took.
|
|
134
|
+
* `seed` takes the place of the plan's own `initial`: it is merged before anything the traversal
|
|
135
|
+
* collected, so a relation or computed value the document plans with other arguments loses, and
|
|
136
|
+
* its field falls back to loading on its own.
|
|
137
|
+
*
|
|
138
|
+
* Synchronous, and runs no user callback, so a play of an async plan costs no more than a play
|
|
139
|
+
* of a synchronous one.
|
|
140
|
+
*/
|
|
141
|
+
play(seed?: Query): PlayedPlan<Model, Query, NodeType>;
|
|
142
|
+
/**
|
|
143
|
+
* The plan played behind `seed`, its mappings recorded for the resolvers beneath it, and its
|
|
144
|
+
* node serialized. A cached plan accepts the current resolver info to scope each execution.
|
|
145
|
+
* Every play records its mappings on the request context; an adapter whose
|
|
146
|
+
* resolvers read a loaded row another way simply never looks them up.
|
|
147
|
+
*/
|
|
148
|
+
query(seed?: Query, info?: GraphQLResolveInfo): Query;
|
|
149
|
+
/**
|
|
150
|
+
* The plan played once, so a play-time error — a conflict between two type-level selections —
|
|
151
|
+
* is raised now rather than only inside a `query()` a resolver may never call. That play is
|
|
152
|
+
* kept, and a later one whose seed conflicts with none of it takes it whole, so settling costs
|
|
153
|
+
* the resolver's own play nothing.
|
|
154
|
+
*/
|
|
155
|
+
settle(): this;
|
|
156
|
+
/**
|
|
157
|
+
* The plan played, with `type`'s type-level selection merged in behind it, minus what conflicts
|
|
158
|
+
* with the field the row is loaded for. A parent-row plan is never replayed behind a caller's
|
|
159
|
+
* selection, so it plays once, here.
|
|
160
|
+
*/
|
|
161
|
+
enterParentType(type: GraphQLNamedType): PlayedPlan<Model, Query, NodeType>;
|
|
162
|
+
/**
|
|
163
|
+
* A settled play that a play seeded with `seed` can take whole, or undefined. A seed conflicting
|
|
164
|
+
* with nothing the settled play holds changes no decision it made, since every rejection was
|
|
165
|
+
* against something the seed leaves in place — unless the seed stands in for the plan's own
|
|
166
|
+
* `initial`, which the settled play already merged.
|
|
167
|
+
*/
|
|
168
|
+
private reusable;
|
|
169
|
+
/**
|
|
170
|
+
* Unlike a field-level select, a type-level selection has no per-field fallback, so a relation
|
|
171
|
+
* argument or a computed value that conflicts with what is already in the node is an error
|
|
172
|
+
* rather than a rejection.
|
|
173
|
+
*/
|
|
174
|
+
private mergeVariant;
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AACvF,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MA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