@loradb/lora-graphql 0.23.0 → 0.24.1
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 +68 -13
- package/dist/analyze/access-lint.d.ts +7 -0
- package/dist/analyze/access.d.ts +13 -33
- package/dist/analyze/assert-schema.d.ts +19 -0
- package/dist/analyze/diff.d.ts +1 -1
- package/dist/analyze/plans.d.ts +1 -1
- package/dist/analyze/principals.d.ts +25 -0
- package/dist/analyze/verdicts.d.ts +51 -0
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/compile/cache.d.ts +1 -1
- package/dist/compile/read/abstract.d.ts +19 -0
- package/dist/compile/read/aggregates.d.ts +34 -0
- package/dist/compile/read/by-keys.d.ts +10 -0
- package/dist/compile/read/common.d.ts +30 -0
- package/dist/compile/read/connection.d.ts +26 -0
- package/dist/compile/read/cypher-field.d.ts +21 -0
- package/dist/compile/read/match.d.ts +11 -0
- package/dist/compile/read/project.d.ts +15 -0
- package/dist/compile/read/root.d.ts +5 -0
- package/dist/compile/read/search.d.ts +16 -0
- package/dist/compile/read/sort.d.ts +42 -0
- package/dist/compile/read/types.d.ts +61 -0
- package/dist/{diff-B9iDdELF.js → diff-K8-GSeKH.js} +2 -2
- package/dist/diff-K8-GSeKH.js.map +1 -0
- package/dist/{driver-C5dSoSD8.js → driver-CXKPLfkz.js} +10796 -10254
- package/dist/driver-CXKPLfkz.js.map +1 -0
- package/dist/execute/cypher-mutation.d.ts +1 -1
- package/dist/execute/mutate/adjust.d.ts +5 -0
- package/dist/execute/mutate/checks.d.ts +21 -0
- package/dist/execute/mutate/delete.d.ts +7 -0
- package/dist/execute/mutate/env.d.ts +73 -0
- package/dist/execute/mutate/errors.d.ts +7 -0
- package/dist/execute/mutate/fragments.d.ts +37 -0
- package/dist/execute/mutate/plan.d.ts +95 -0
- package/dist/execute/mutate/runner.d.ts +129 -0
- package/dist/execute/mutate/unique-together.d.ts +18 -0
- package/dist/execute/mutate.d.ts +2 -79
- package/dist/index.d.ts +10 -6
- package/dist/index.js +2 -2
- package/dist/lora-graphql.d.ts +18 -328
- package/dist/model/build/authorization.d.ts +31 -0
- package/dist/model/build/cypher-field.d.ts +11 -0
- package/dist/model/build/directive-args.d.ts +16 -0
- package/dist/model/build/limits.d.ts +18 -0
- package/dist/model/build/relationship-field.d.ts +11 -0
- package/dist/model/build/rule-checks.d.ts +23 -0
- package/dist/model/build/rule-references.d.ts +28 -0
- package/dist/model/build/scalar-field.d.ts +7 -0
- package/dist/model/build/search.d.ts +4 -0
- package/dist/model/build/shapes.d.ts +18 -0
- package/dist/model/build/unique-together.d.ts +5 -0
- package/dist/model/build.d.ts +3 -20
- package/dist/model/directives.d.ts +1 -1
- package/dist/model/types.d.ts +12 -2
- package/dist/options.d.ts +255 -0
- package/dist/results.d.ts +70 -0
- package/dist/runtime/custom-requires.d.ts +7 -0
- package/dist/runtime/database-error.d.ts +10 -0
- package/dist/runtime/documents.d.ts +35 -0
- package/dist/runtime/limits.d.ts +37 -0
- package/dist/runtime/request.d.ts +33 -0
- package/dist/runtime/timing.d.ts +13 -0
- package/dist/schema/aggregates.d.ts +17 -0
- package/dist/schema/base.d.ts +17 -0
- package/dist/schema/build.d.ts +3 -42
- package/dist/schema/filters.d.ts +10 -0
- package/dist/schema/hooks.d.ts +42 -0
- package/dist/schema/objects.d.ts +36 -0
- package/dist/schema/query.d.ts +8 -0
- package/dist/schema/resolvers.d.ts +13 -0
- package/dist/schema/sorts.d.ts +5 -0
- package/dist/schema/subscriptions.d.ts +7 -0
- package/dist/subscriptions/change-hub.d.ts +50 -0
- package/dist/subscriptions/compiles.d.ts +23 -0
- package/dist/subscriptions/events.d.ts +9 -0
- package/dist/subscriptions/filter-cost.d.ts +15 -0
- package/dist/subscriptions/subscriptions.d.ts +73 -0
- package/dist/testing.d.ts +4 -1
- package/dist/testing.js +34 -29
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
- package/dist/compile/read.d.ts +0 -102
- package/dist/diff-B9iDdELF.js.map +0 -1
- package/dist/driver-C5dSoSD8.js.map +0 -1
package/dist/compile/read.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { FieldNode, SelectionSetNode } from 'graphql';
|
|
2
|
-
import { QueryResult, Statement } from '../driver.js';
|
|
3
|
-
import { AbstractType, CypherField, NodeType, SearchIndex, PageLimit } from '../model/types.js';
|
|
4
|
-
import { CompileContext } from './context.js';
|
|
5
|
-
import { Clause, Expr } from './cypher.js';
|
|
6
|
-
export type RootKind = "list" | "single" | "connection" | "aggregate" | "grouped";
|
|
7
|
-
/** How the plan of a statement is expected to find its first rows (S2). */
|
|
8
|
-
export interface SeekExpectation {
|
|
9
|
-
statement: number;
|
|
10
|
-
label: string;
|
|
11
|
-
access: "exact" | "range" | "text" | "point";
|
|
12
|
-
reason: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ReadSet {
|
|
15
|
-
labels: string[];
|
|
16
|
-
relationships: string[];
|
|
17
|
-
/**
|
|
18
|
-
* A `@cypher` statement (or a mutation) is part of the read: it may
|
|
19
|
-
* read anything, so every change affects it.
|
|
20
|
-
*/
|
|
21
|
-
opaque?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface CompiledRead {
|
|
24
|
-
statements: Statement[];
|
|
25
|
-
/** Turns the statements' results into the root field's value. */
|
|
26
|
-
shape: (results: QueryResult[]) => unknown;
|
|
27
|
-
/** Result columns the first statement must produce. */
|
|
28
|
-
columns: string[];
|
|
29
|
-
reads: ReadSet;
|
|
30
|
-
expectations: SeekExpectation[];
|
|
31
|
-
/** Estimated rows touched: the bound the cost limit checks. */
|
|
32
|
-
cost: number;
|
|
33
|
-
/** `read` for queries; `write` for @cypher mutations. */
|
|
34
|
-
mode: "read" | "write";
|
|
35
|
-
/**
|
|
36
|
-
* At most one row, found by an exact @key seek, projecting only stored
|
|
37
|
-
* properties: no relationship, @cypher field or rule traversal. Cheap
|
|
38
|
-
* enough for a driver to run synchronously.
|
|
39
|
-
*/
|
|
40
|
-
bounded?: boolean;
|
|
41
|
-
}
|
|
42
|
-
type Args = Record<string, unknown>;
|
|
43
|
-
/** A connection value before its resolvers turn it into edges/pageInfo. */
|
|
44
|
-
export interface RawConnection {
|
|
45
|
-
__rows: RawEdge[];
|
|
46
|
-
__first: number;
|
|
47
|
-
/** A cursor (`after` or `before`) was given. */
|
|
48
|
-
__after: boolean;
|
|
49
|
-
/** `last` / `before`: rows arrive in reverse and are flipped back. */
|
|
50
|
-
__backward: boolean;
|
|
51
|
-
__sort: string;
|
|
52
|
-
__totalCount?: number;
|
|
53
|
-
}
|
|
54
|
-
export interface RawEdge {
|
|
55
|
-
node: unknown;
|
|
56
|
-
properties?: unknown;
|
|
57
|
-
__cursor: unknown[];
|
|
58
|
-
}
|
|
59
|
-
export declare function compileRoot(ctx: CompileContext, kind: RootKind, node: NodeType, args: Args, fieldNodes: readonly FieldNode[]): CompiledRead;
|
|
60
|
-
export declare function finish(ctx: CompileContext, clauses: Clause[], columns: string[], shape: CompiledRead["shape"], expectation: Omit<SeekExpectation, "statement"> | undefined, extra?: Statement[], mode?: "read" | "write"): CompiledRead;
|
|
61
|
-
export declare function readSet(ctx: CompileContext): ReadSet;
|
|
62
|
-
/**
|
|
63
|
-
* A root `@cypher` field on Query or Mutation: the statement runs in a
|
|
64
|
-
* `CALL { }`, and returned nodes are projected like any other read.
|
|
65
|
-
*/
|
|
66
|
-
export declare function compileCypherRoot(ctx: CompileContext, field: CypherField, args: Args, fieldNodes: readonly FieldNode[]): CompiledRead;
|
|
67
|
-
/** `events(where, sort, limit)` over an interface's implementations or a union's members. */
|
|
68
|
-
export declare function compileAbstractRoot(ctx: CompileContext, abstract: AbstractType, args: Args, fieldNodes: readonly FieldNode[]): CompiledRead;
|
|
69
|
-
/** A search root field's value: nodes with their scores. */
|
|
70
|
-
export interface SearchResult {
|
|
71
|
-
node: unknown;
|
|
72
|
-
score: number;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* A search as a connection (`connection: true`): pages forward by keyset
|
|
76
|
-
* on (score DESC, key ASC). A vector index returns its top candidates
|
|
77
|
-
* before any filter, so vector connections page within a fixed pool of
|
|
78
|
-
* `4 × @limit(max:)` candidates.
|
|
79
|
-
*/
|
|
80
|
-
export declare function compileSearch(ctx: CompileContext, node: NodeType, index: SearchIndex, args: Args, fieldNodes: readonly FieldNode[], connection?: boolean): CompiledRead;
|
|
81
|
-
/**
|
|
82
|
-
* Nodes by @key, in one statement, for mutation payloads: the read runs
|
|
83
|
-
* inside the mutation's transaction and sees its writes.
|
|
84
|
-
*/
|
|
85
|
-
export declare function compileByKeys(ctx: CompileContext, node: NodeType, keys: unknown[], sets: SelectionSetNode[]): CompiledRead;
|
|
86
|
-
export declare function keyOf(value: unknown): string;
|
|
87
|
-
/** The statement text with its parameters renamed to bound `$pN`s. */
|
|
88
|
-
export declare function bindStatement(ctx: CompileContext, field: CypherField, args: Args): string;
|
|
89
|
-
/** Default `maxListArgument`: the most items a @cypher list argument takes. */
|
|
90
|
-
export declare const MAX_LIST_ARGUMENT = 1000;
|
|
91
|
-
export declare function resolveLimit(value: unknown, limit: PageLimit, argument: string): number;
|
|
92
|
-
export interface Projection {
|
|
93
|
-
/** Subqueries that must run before the projection is evaluated. */
|
|
94
|
-
pre: Clause[];
|
|
95
|
-
expr: Expr;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Project `variable` (a `node`) with the selection sets. `rows` is how
|
|
99
|
-
* many parents this projection runs for, for the cost estimate.
|
|
100
|
-
*/
|
|
101
|
-
export declare function projectNode(ctx: CompileContext, node: NodeType, variable: string, sets: SelectionSetNode[], rows: number): Projection;
|
|
102
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff-B9iDdELF.js","sources":["../src/analyze/diff.ts"],"sourcesContent":["// S7: one SDL, two diffs. A change to the annotated SDL changes both the\n// database (constraints, indexes, labels, property names) and the public\n// API; `diffSchemas` reports both from the same two documents.\n\nimport * as graphql from \"graphql\";\nimport type { DocumentNode, GraphQLSchema } from \"graphql\";\nimport { name } from \"../compile/cypher.js\";\nimport { buildModel, type ModelOptions } from \"../model/build.js\";\nimport type { Field, GraphModel, ScalarField } from \"../model/types.js\";\nimport { buildSchema } from \"../schema/build.js\";\nimport {\n inferRequirements,\n requirementDdl,\n requirementId,\n type SchemaRequirement,\n} from \"./indexes.js\";\n\nexport interface ApiChange {\n /** graphql-js change type, e.g. `FIELD_REMOVED`. */\n type: string;\n description: string;\n}\n\nexport interface SchemaDiff {\n database: {\n create: SchemaRequirement[];\n drop: SchemaRequirement[];\n /**\n * Statements in the order to run them. Drops and data migrations are\n * destructive: review them before running.\n */\n statements: Array<{ text: string; destructive: boolean; reason: string }>;\n };\n api: {\n /** Changes that break existing clients. */\n breaking: ApiChange[];\n /** Changes that may change behaviour for existing clients. */\n dangerous: ApiChange[];\n };\n /** Consequences worth a human look, e.g. a rename kept by @alias. */\n notes: string[];\n}\n\nexport function diffSchemas(\n before: string | DocumentNode,\n after: string | DocumentNode,\n options: ModelOptions = {},\n): SchemaDiff {\n const oldModel = buildModel(before, options);\n const newModel = buildModel(after, options);\n\n const id = requirementId;\n const oldReqs = new Map(inferRequirements(oldModel).map((r) => [id(r), r]));\n const newReqs = new Map(inferRequirements(newModel).map((r) => [id(r), r]));\n const create = [...newReqs]\n .filter(([k]) => !oldReqs.has(k))\n .map(([, r]) => r);\n const drop = [...oldReqs].filter(([k]) => !newReqs.has(k)).map(([, r]) => r);\n\n const statements: SchemaDiff[\"database\"][\"statements\"] = [];\n const notes: string[] = [];\n migrations(oldModel, newModel, statements, notes);\n for (const r of drop) {\n statements.push({\n text: `DROP ${r.kind === \"constraint\" ? \"CONSTRAINT\" : \"INDEX\"} \\`${r.name.replace(/`/g, \"``\")}\\` IF EXISTS`,\n destructive: true,\n reason: `no longer needed: ${r.reason}`,\n });\n }\n for (const r of create) {\n statements.push({\n text: requirementDdl(r),\n destructive: false,\n reason: r.reason,\n });\n }\n\n const api = apiChanges(publicSchema(oldModel), publicSchema(newModel));\n return { database: { create, drop, statements }, api, notes };\n}\n\n/** Relabelled types and renamed properties need their data moved. */\nfunction migrations(\n before: GraphModel,\n after: GraphModel,\n statements: SchemaDiff[\"database\"][\"statements\"],\n notes: string[],\n) {\n for (const [typeName, oldNode] of before.nodes) {\n const newNode = after.nodes.get(typeName);\n if (!newNode) {\n notes.push(\n `${typeName} was removed; its :${oldNode.labels[0]} nodes stay in the database`,\n );\n continue;\n }\n const oldLabel = oldNode.labels[0]!;\n const newLabel = newNode.labels[0]!;\n if (oldLabel !== newLabel) {\n statements.push({\n text: `MATCH (n:${name(oldLabel)}) SET n:${name(newLabel)} REMOVE n:${name(oldLabel)}`,\n destructive: true,\n reason: `${typeName}'s label changed from ${oldLabel} to ${newLabel}`,\n });\n }\n const oldFields = scalars(oldNode.fields);\n const newFields = scalars(newNode.fields);\n for (const [fieldName, oldField] of oldFields) {\n const newField = newFields.get(fieldName);\n if (newField && newField.property !== oldField.property) {\n statements.push({\n text: `MATCH (n:${name(newLabel)}) WHERE n.${name(oldField.property)} IS NOT NULL SET n.${name(newField.property)} = n.${name(oldField.property)} REMOVE n.${name(oldField.property)}`,\n destructive: true,\n reason: `${typeName}.${fieldName} now stores \\`${newField.property}\\` instead of \\`${oldField.property}\\``,\n });\n }\n if (!newField) {\n const renamed = [...newFields.values()].find(\n (f) => f.property === oldField.property && !oldFields.has(f.name),\n );\n if (renamed) {\n notes.push(\n `${typeName}.${fieldName} is now ${typeName}.${renamed.name} over the same property \\`${oldField.property}\\`: an API break with no data migration`,\n );\n }\n }\n }\n }\n}\n\nfunction scalars(fields: ReadonlyMap<string, Field>): Map<string, ScalarField> {\n const out = new Map<string, ScalarField>();\n for (const f of fields.values()) if (f.kind === \"scalar\") out.set(f.name, f);\n return out;\n}\n\nfunction publicSchema(model: GraphModel): GraphQLSchema {\n const never = () => Promise.reject(new Error(\"not connected\"));\n return buildSchema(model, {\n customResolver: () => () => null,\n resolveSearch: never,\n resolveAbstract: never,\n subscribe: () => {\n throw new Error(\"not connected\");\n },\n resolveChangedNode: never,\n previousValue: () => null,\n resolveRoot: never,\n resolveNode: never,\n resolveCypher: never,\n resolveMutation: never,\n });\n}\n\ntype ChangeFinder = (\n a: GraphQLSchema,\n b: GraphQLSchema,\n) => Array<{ type: string; description: string }>;\n\nfunction apiChanges(\n before: GraphQLSchema,\n after: GraphQLSchema,\n): SchemaDiff[\"api\"] {\n // graphql-js 16 ships these; 17 removed them.\n const lib = graphql as unknown as {\n findBreakingChanges?: ChangeFinder;\n findDangerousChanges?: ChangeFinder;\n };\n if (!lib.findBreakingChanges || !lib.findDangerousChanges) {\n return {\n breaking: [\n {\n type: \"UNSUPPORTED\",\n description:\n \"this graphql version has no findBreakingChanges; compare printPublicSchema() output with @graphql-inspector/core\",\n },\n ],\n dangerous: [],\n };\n }\n const pick = (c: { type: string; description: string }) => ({\n type: c.type,\n description: c.description,\n });\n return {\n breaking: lib.findBreakingChanges(before, after).map(pick),\n dangerous: lib.findDangerousChanges(before, after).map(pick),\n };\n}\n"],"names":["diffSchemas","before","after","options","oldModel","buildModel","newModel","id","requirementId","oldReqs","inferRequirements","r","newReqs","create","k","drop","statements","notes","migrations","requirementDdl","api","apiChanges","publicSchema","typeName","oldNode","newNode","oldLabel","newLabel","name","oldFields","scalars","newFields","fieldName","oldField","newField","renamed","f","fields","out","model","never","buildSchema","lib","graphql","pick","c"],"mappings":";;AA2CO,SAASA,EACdC,GACAC,GACAC,IAAwB,CAAA,GACZ;AACZ,QAAMC,IAAWC,EAAWJ,GAAQE,CAAO,GACrCG,IAAWD,EAAWH,GAAOC,CAAO,GAEpCI,IAAKC,GACLC,IAAU,IAAI,IAAIC,EAAkBN,CAAQ,EAAE,IAAI,CAACO,MAAM,CAACJ,EAAGI,CAAC,GAAGA,CAAC,CAAC,CAAC,GACpEC,IAAU,IAAI,IAAIF,EAAkBJ,CAAQ,EAAE,IAAI,CAACK,MA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