@descryy/adapter-graphql 0.1.0 → 0.3.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/LICENSE ADDED
@@ -0,0 +1,8 @@
1
+ Copyright (c) 2026 Descry
2
+
3
+ All rights reserved.
4
+
5
+ This software is proprietary and confidential. No license, express or
6
+ implied, to use, copy, modify, merge, publish, distribute, sublicense, or
7
+ sell copies of this software is granted without prior written permission
8
+ from the copyright holder.
package/dist/adapter.d.ts CHANGED
@@ -1,84 +1,46 @@
1
1
  /**
2
- * The GraphQL SDL adapter.
2
+ * The GraphQL SDL adapter. Reaches R3 with no language adapter, like
3
+ * `adapter-sql` and `adapter-openapi`: a published schema is declared, not
4
+ * deduced. It's a `LanguageAdapter` as a per-format reader with a
5
+ * capability matrix, not because SDL is a language — `language: "graphql"`
6
+ * names the artifact read (DEC-026).
3
7
  *
4
- * The third capability in this project that reaches **R3 with no language
5
- * adapter at all**, after `adapter-sql` and `adapter-openapi`, and for the same
6
- * reason all three do: a published schema is *declared*, not deduced. It is a
7
- * `LanguageAdapter` because it is a per-format reader with a capability matrix,
8
- * not because SDL is a programming language — `language: "graphql"` describes
9
- * the artifact it read, DEC-026, exactly the reading `adapter-sql` and
10
- * `adapter-openapi` get.
8
+ * ## Identity
11
9
  *
12
- * ## What it mints, and why the identity is not this file's to choose
10
+ * DEC-317 fixed GraphQL operation identity against Python/strawberry:
11
+ * `method` is the sentinel `"GRAPHQL"`, path is `/<OperationType>/<field>`,
12
+ * and any later GraphQL reader must mint the identical shape. This is the
13
+ * first one — tested, not just asserted: `sdl-strawberry-join.test.ts` runs
14
+ * both producers and compares emitted ids, per DEC-321's join pattern.
13
15
  *
14
- * `DEC-317` fixed GraphQL operation identity, transposing `DEC-316`'s gRPC
15
- * precedent: `method` is the literal sentinel `"GRAPHQL"`, the path is
16
- * `/<OperationType>/<field>`. That decision was written against Python's
17
- * strawberry, and its "Consequences" section says any later GraphQL reader
18
- * "must mint this identical shape". This is the first such reader, so this is
19
- * the first place that claim is *tested* rather than asserted —
20
- * `test/sdl-strawberry-join.test.ts` runs both producers over the same
21
- * operation and compares the emitted ids, in the shape `DEC-321` established
22
- * for the PHP/SQL `DATABASE_TABLE` join.
16
+ * strawberry has no artifact to read, so DEC-317 derived names from class
17
+ * structure and refused anything only computable
18
+ * (`graphqlFieldNameNotReadable`). An SDL field name IS the schema-facing
19
+ * name — nothing to compute or refuse. The precedence over strawberry is
20
+ * resolution, not a priority rule: SDL emits at R3 (the document is the
21
+ * schema), strawberry at R0/R1, and rule 3 (the resolution cap) ranks them
22
+ * on its own — no producer allow-list above the IR.
23
23
  *
24
- * ## Why this reader supersedes the class-structure one, and how
24
+ * SDL and source diverge visibly rather than fight: `API_ROUTE` is
25
+ * language-scoped so the two producers' routes never collide, meeting only
26
+ * at the fileless, language-less `API_ENDPOINT`. Agreement is one
27
+ * `API_ENDPOINT` with two `SERVES_API` edges at two resolutions; a naming
28
+ * disagreement is two `API_ENDPOINT` nodes, the SDL's at R3 — same
29
+ * treatment as a stale committed `openapi.json`: disclosed, not resolved.
25
30
  *
26
- * `DEC-317` §"The departure" is candid that strawberry forced a compromise:
27
- * with no artifact to read, the schema-facing name had to be derived from the
28
- * class structure, and a name that could only be *computed* had to be refused
29
- * as `graphqlFieldNameNotReadable`. An SDL field name is the schema-facing name
30
- * by definition. There is nothing to compute and nothing to refuse.
31
+ * ## Two deliberate refusals
31
32
  *
32
- * **The precedence is expressed through resolution, not through a priority
33
- * rule, and that is deliberate.** This adapter emits at R3: the document is the
34
- * schema. `adapter-python`'s strawberry reader emits its operations at R0 or R1
35
- * (`extract.ts` — R1 once a field was reached through the import graph). Rule 3,
36
- * the resolution cap, then does the ranking on its own: an SDL-derived finding
37
- * is capped at reliability class A and a strawberry-derived one at C or B. No
38
- * new machinery, no producer allow-list, no "SDL wins" branch anywhere above
39
- * the IR — the mechanism the engine already has says the right thing, because
40
- * the two producers genuinely differ in the strength of their evidence.
33
+ * **No `DTO`.** In REST the response body IS the schema (`adapter-openapi`
34
+ * mints one per response type); a GraphQL client selects its own fields, so
35
+ * a `USES_TYPE` edge asserting a whole returned shape would be wrong for
36
+ * every caller.
41
37
  *
42
- * **Where SDL and source disagree, they do not fight — they diverge visibly.**
43
- * The two producers' `API_ROUTE` nodes are distinct by construction (`API_ROUTE`
44
- * is language-scoped, so `graphql` and `python` routes never share an id), and
45
- * that asymmetry is the contract mechanism working as designed: the route is
46
- * each producer's local view. They meet at the `API_ENDPOINT`, which is fileless
47
- * and language-less. So:
48
- *
49
- * - **agreement** — one `API_ENDPOINT`, two `SERVES_API` edges into it from two
50
- * routes, at two resolutions. This is the join, and it is the case that
51
- * proves the convention transposed correctly.
52
- * - **disagreement on a name** — two `API_ENDPOINT` nodes, one per spelling.
53
- * The SDL's is the correct one, and it carries R3 while the source-derived one
54
- * carries R0/R1. A stale committed SDL is the same risk a stale committed
55
- * `openapi.json` carries and is treated the same way: disclosed, not
56
- * downgraded. The divergence being *visible* is the useful property — a
57
- * published schema that no longer matches its source is a real finding, and a
58
- * reader that silently preferred one would have destroyed the evidence for it.
59
- *
60
- * ## What it does not claim, and the two refusals are load-bearing
61
- *
62
- * **No `DTO`, and not for scope reasons.** `adapter-openapi` mints a `DTO` per
63
- * `components.schemas` entry and a `USES_TYPE` edge from the operation that
64
- * names it, because in REST the response body *is* the schema the operation
65
- * returns. **GraphQL does not work that way.** A client selects the fields it
66
- * wants, so a `USES_TYPE` edge asserting "this operation returns this shape"
67
- * would be false for every caller that selects a subset — which is every caller.
68
- * Emitting one would be a wrong edge, and rule 2 puts a wrong edge below a
69
- * missing one because it corrupts every layer above it. Disclosed gap.
70
- *
71
- * **No `USES_API`, and this one is a gate.** `DEC-317` §"The one flagged risk"
72
- * found that `nearestMiss` rule 2 collapses under GraphQL paths — every
73
- * operation is arity-2, carries no `{param}`, and draws its first segment from a
74
- * set of size three — and gated any caller-side GraphQL reader on that being
75
- * fixed first. `DEC-319` has since given rule 2 a measured similarity floor,
76
- * which narrows the collapse but does not by itself discharge a gate that was
77
- * written about a rule's reachability. This adapter builds the **server half
78
- * only**, so it does not reach `nearestMiss` at all: that function is called
79
- * from exactly one place, `orphans.ts`'s `withCallers` loop, which requires an
80
- * endpoint with a `USES_API` caller. Verified in `descry-core` for this change,
81
- * not inherited.
38
+ * **No `USES_API`.** DEC-317 gated any caller-side GraphQL reader on
39
+ * `nearestMiss` rule 2, which collapses on GraphQL paths (arity-2, no
40
+ * `{param}`, three-way first segment); DEC-319's floor narrows but doesn't
41
+ * discharge that gate. This adapter builds the server half only, so it
42
+ * never reaches `nearestMiss` — called solely from `orphans.ts`'s
43
+ * `withCallers` loop, which needs a `USES_API` caller.
82
44
  */
83
45
  import { type LanguageAdapter, type ResolutionLevel } from "@descryy/ir";
84
46
  import { type OperationSlot } from "./document.ts";
@@ -92,15 +54,11 @@ export declare const DEFAULT_SCHEMA_GLOBS: readonly ["**/*.graphql", "**/*.gql"]
92
54
  /** DEC-026: the artifact read, not a programming language. Part of the id since DEC-054. */
93
55
  export declare const LANGUAGE = "graphql";
94
56
  /**
95
- * `DEC-317`'s protocol sentinel, repeated here rather than imported.
96
- *
97
- * `adapter-python` exports the same constant from `packages/adapter-python/src/graphql.ts`,
98
- * and importing it would make a format adapter depend on a language adapter to
99
- * state its own identity — the dependency edge pointing the wrong way, and a
100
- * package boundary crossed for one string. The value is pinned by the
101
- * two-producer test instead, which is the guard that actually matters: a
102
- * shared constant that both sides import can drift from the *decision* without
103
- * either test noticing, whereas a test that runs both producers cannot.
57
+ * DEC-317's protocol sentinel, repeated here rather than imported from
58
+ * `adapter-python` — importing it would make a format adapter depend on a
59
+ * language adapter for its own identity, the wrong direction. The
60
+ * two-producer test pins the value instead; a shared imported constant
61
+ * could drift from the decision without either side noticing.
104
62
  */
105
63
  export declare const GRAPHQL_METHOD = "GRAPHQL";
106
64
  /** `Query` + `circuit` -> `/Query/circuit`. `DEC-317`'s path shape, exactly. */
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAKH,OAAO,EAYL,KAAK,eAAe,EAGpB,KAAK,eAAe,EAErB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAA4C,KAAK,aAAa,EAAe,MAAM,eAAe,CAAC;AAE1G,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAC5C,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uCAAwC,CAAC;AAE1E,4FAA4F;AAC5F,eAAO,MAAM,QAAQ,YAAY,CAAC;AAElC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,YAAY,CAAC;AAIxC,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAOD,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B,GAAG,eAAe,CA2GzF"}
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAKH,OAAO,EAYL,KAAK,eAAe,EAGpB,KAAK,eAAe,EAErB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAA4C,KAAK,aAAa,EAAe,MAAM,eAAe,CAAC;AAE1G,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAC5C,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uCAAwC,CAAC;AAE1E,4FAA4F;AAC5F,eAAO,MAAM,QAAQ,YAAY,CAAC;AAElC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,YAAY,CAAC;AAIxC,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAOD,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B,GAAG,eAAe,CAqGzF"}
package/dist/adapter.js CHANGED
@@ -1,84 +1,46 @@
1
1
  /**
2
- * The GraphQL SDL adapter.
2
+ * The GraphQL SDL adapter. Reaches R3 with no language adapter, like
3
+ * `adapter-sql` and `adapter-openapi`: a published schema is declared, not
4
+ * deduced. It's a `LanguageAdapter` as a per-format reader with a
5
+ * capability matrix, not because SDL is a language — `language: "graphql"`
6
+ * names the artifact read (DEC-026).
3
7
  *
4
- * The third capability in this project that reaches **R3 with no language
5
- * adapter at all**, after `adapter-sql` and `adapter-openapi`, and for the same
6
- * reason all three do: a published schema is *declared*, not deduced. It is a
7
- * `LanguageAdapter` because it is a per-format reader with a capability matrix,
8
- * not because SDL is a programming language — `language: "graphql"` describes
9
- * the artifact it read, DEC-026, exactly the reading `adapter-sql` and
10
- * `adapter-openapi` get.
8
+ * ## Identity
11
9
  *
12
- * ## What it mints, and why the identity is not this file's to choose
10
+ * DEC-317 fixed GraphQL operation identity against Python/strawberry:
11
+ * `method` is the sentinel `"GRAPHQL"`, path is `/<OperationType>/<field>`,
12
+ * and any later GraphQL reader must mint the identical shape. This is the
13
+ * first one — tested, not just asserted: `sdl-strawberry-join.test.ts` runs
14
+ * both producers and compares emitted ids, per DEC-321's join pattern.
13
15
  *
14
- * `DEC-317` fixed GraphQL operation identity, transposing `DEC-316`'s gRPC
15
- * precedent: `method` is the literal sentinel `"GRAPHQL"`, the path is
16
- * `/<OperationType>/<field>`. That decision was written against Python's
17
- * strawberry, and its "Consequences" section says any later GraphQL reader
18
- * "must mint this identical shape". This is the first such reader, so this is
19
- * the first place that claim is *tested* rather than asserted —
20
- * `test/sdl-strawberry-join.test.ts` runs both producers over the same
21
- * operation and compares the emitted ids, in the shape `DEC-321` established
22
- * for the PHP/SQL `DATABASE_TABLE` join.
16
+ * strawberry has no artifact to read, so DEC-317 derived names from class
17
+ * structure and refused anything only computable
18
+ * (`graphqlFieldNameNotReadable`). An SDL field name IS the schema-facing
19
+ * name — nothing to compute or refuse. The precedence over strawberry is
20
+ * resolution, not a priority rule: SDL emits at R3 (the document is the
21
+ * schema), strawberry at R0/R1, and rule 3 (the resolution cap) ranks them
22
+ * on its own — no producer allow-list above the IR.
23
23
  *
24
- * ## Why this reader supersedes the class-structure one, and how
24
+ * SDL and source diverge visibly rather than fight: `API_ROUTE` is
25
+ * language-scoped so the two producers' routes never collide, meeting only
26
+ * at the fileless, language-less `API_ENDPOINT`. Agreement is one
27
+ * `API_ENDPOINT` with two `SERVES_API` edges at two resolutions; a naming
28
+ * disagreement is two `API_ENDPOINT` nodes, the SDL's at R3 — same
29
+ * treatment as a stale committed `openapi.json`: disclosed, not resolved.
25
30
  *
26
- * `DEC-317` §"The departure" is candid that strawberry forced a compromise:
27
- * with no artifact to read, the schema-facing name had to be derived from the
28
- * class structure, and a name that could only be *computed* had to be refused
29
- * as `graphqlFieldNameNotReadable`. An SDL field name is the schema-facing name
30
- * by definition. There is nothing to compute and nothing to refuse.
31
+ * ## Two deliberate refusals
31
32
  *
32
- * **The precedence is expressed through resolution, not through a priority
33
- * rule, and that is deliberate.** This adapter emits at R3: the document is the
34
- * schema. `adapter-python`'s strawberry reader emits its operations at R0 or R1
35
- * (`extract.ts` — R1 once a field was reached through the import graph). Rule 3,
36
- * the resolution cap, then does the ranking on its own: an SDL-derived finding
37
- * is capped at reliability class A and a strawberry-derived one at C or B. No
38
- * new machinery, no producer allow-list, no "SDL wins" branch anywhere above
39
- * the IR — the mechanism the engine already has says the right thing, because
40
- * the two producers genuinely differ in the strength of their evidence.
33
+ * **No `DTO`.** In REST the response body IS the schema (`adapter-openapi`
34
+ * mints one per response type); a GraphQL client selects its own fields, so
35
+ * a `USES_TYPE` edge asserting a whole returned shape would be wrong for
36
+ * every caller.
41
37
  *
42
- * **Where SDL and source disagree, they do not fight — they diverge visibly.**
43
- * The two producers' `API_ROUTE` nodes are distinct by construction (`API_ROUTE`
44
- * is language-scoped, so `graphql` and `python` routes never share an id), and
45
- * that asymmetry is the contract mechanism working as designed: the route is
46
- * each producer's local view. They meet at the `API_ENDPOINT`, which is fileless
47
- * and language-less. So:
48
- *
49
- * - **agreement** — one `API_ENDPOINT`, two `SERVES_API` edges into it from two
50
- * routes, at two resolutions. This is the join, and it is the case that
51
- * proves the convention transposed correctly.
52
- * - **disagreement on a name** — two `API_ENDPOINT` nodes, one per spelling.
53
- * The SDL's is the correct one, and it carries R3 while the source-derived one
54
- * carries R0/R1. A stale committed SDL is the same risk a stale committed
55
- * `openapi.json` carries and is treated the same way: disclosed, not
56
- * downgraded. The divergence being *visible* is the useful property — a
57
- * published schema that no longer matches its source is a real finding, and a
58
- * reader that silently preferred one would have destroyed the evidence for it.
59
- *
60
- * ## What it does not claim, and the two refusals are load-bearing
61
- *
62
- * **No `DTO`, and not for scope reasons.** `adapter-openapi` mints a `DTO` per
63
- * `components.schemas` entry and a `USES_TYPE` edge from the operation that
64
- * names it, because in REST the response body *is* the schema the operation
65
- * returns. **GraphQL does not work that way.** A client selects the fields it
66
- * wants, so a `USES_TYPE` edge asserting "this operation returns this shape"
67
- * would be false for every caller that selects a subset — which is every caller.
68
- * Emitting one would be a wrong edge, and rule 2 puts a wrong edge below a
69
- * missing one because it corrupts every layer above it. Disclosed gap.
70
- *
71
- * **No `USES_API`, and this one is a gate.** `DEC-317` §"The one flagged risk"
72
- * found that `nearestMiss` rule 2 collapses under GraphQL paths — every
73
- * operation is arity-2, carries no `{param}`, and draws its first segment from a
74
- * set of size three — and gated any caller-side GraphQL reader on that being
75
- * fixed first. `DEC-319` has since given rule 2 a measured similarity floor,
76
- * which narrows the collapse but does not by itself discharge a gate that was
77
- * written about a rule's reachability. This adapter builds the **server half
78
- * only**, so it does not reach `nearestMiss` at all: that function is called
79
- * from exactly one place, `orphans.ts`'s `withCallers` loop, which requires an
80
- * endpoint with a `USES_API` caller. Verified in `descry-core` for this change,
81
- * not inherited.
38
+ * **No `USES_API`.** DEC-317 gated any caller-side GraphQL reader on
39
+ * `nearestMiss` rule 2, which collapses on GraphQL paths (arity-2, no
40
+ * `{param}`, three-way first segment); DEC-319's floor narrows but doesn't
41
+ * discharge that gate. This adapter builds the server half only, so it
42
+ * never reaches `nearestMiss` — called solely from `orphans.ts`'s
43
+ * `withCallers` loop, which needs a `USES_API` caller.
82
44
  */
83
45
  import { readFileSync } from "node:fs";
84
46
  import { join } from "node:path";
@@ -95,15 +57,11 @@ export const DEFAULT_SCHEMA_GLOBS = ["**/*.graphql", "**/*.gql"];
95
57
  /** DEC-026: the artifact read, not a programming language. Part of the id since DEC-054. */
96
58
  export const LANGUAGE = "graphql";
97
59
  /**
98
- * `DEC-317`'s protocol sentinel, repeated here rather than imported.
99
- *
100
- * `adapter-python` exports the same constant from `packages/adapter-python/src/graphql.ts`,
101
- * and importing it would make a format adapter depend on a language adapter to
102
- * state its own identity — the dependency edge pointing the wrong way, and a
103
- * package boundary crossed for one string. The value is pinned by the
104
- * two-producer test instead, which is the guard that actually matters: a
105
- * shared constant that both sides import can drift from the *decision* without
106
- * either test noticing, whereas a test that runs both producers cannot.
60
+ * DEC-317's protocol sentinel, repeated here rather than imported from
61
+ * `adapter-python` — importing it would make a format adapter depend on a
62
+ * language adapter for its own identity, the wrong direction. The
63
+ * two-producer test pins the value instead; a shared imported constant
64
+ * could drift from the decision without either side noticing.
107
65
  */
108
66
  export const GRAPHQL_METHOD = "GRAPHQL";
109
67
  const PRODUCED_BY = `${ADAPTER_ID}@${ADAPTER_VERSION}`;
@@ -148,9 +106,7 @@ export function createGraphqlAdapter(options = {}) {
148
106
  capabilities() {
149
107
  return {
150
108
  maxResolution: ceiling,
151
- // No DTO and no USES_TYPE: a GraphQL client selects its own fields, so
152
- // an edge asserting that an operation returns a whole named shape would
153
- // be wrong for every caller. See the module header.
109
+ // No DTO/USES_TYPE: a client selects its own fields — see module header.
154
110
  nodeTypes: ["API_ROUTE", "API_ENDPOINT"],
155
111
  edgeTypes: ["SERVES_API"],
156
112
  hasCallHierarchy: false,
@@ -161,9 +117,7 @@ export function createGraphqlAdapter(options = {}) {
161
117
  },
162
118
  async prepare(ctx) {
163
119
  root = ctx.root;
164
- // Nothing to prepare and nothing that can fail: no dependency resolution,
165
- // no type checker, no index. R3 is not optimism — the document *is* the
166
- // schema, and every name in it is the served name.
120
+ // Nothing to prepare or resolve — R3 isn't optimism, the document IS the schema.
167
121
  return ceiling;
168
122
  },
169
123
  async parseFiles(files) {
@@ -189,10 +143,8 @@ export function createGraphqlAdapter(options = {}) {
189
143
  commitSha: ctx.root.commitSha,
190
144
  producedBy: PRODUCED_BY,
191
145
  sourceFiles: units.map((unit) => unit.file),
192
- // `schemasUnder` already filters to units that read as a schema — a
193
- // `.graphql` file holding an executable document is excluded from
194
- // `units` (and so from `sourceFiles`) without reaching this session,
195
- // exactly as `adapter-openapi` handles an unparseable contract.
146
+ // schemasUnder already filters out executable documents (excluded from
147
+ // sourceFiles too) — same treatment as adapter-openapi's unparseable contract.
196
148
  skippedFiles: [],
197
149
  reachedResolution: reached,
198
150
  nodes,
@@ -219,10 +171,8 @@ function build(units, repoRoot, reached) {
219
171
  let anchorId;
220
172
  for (const field of rootFieldsOf(schema)) {
221
173
  const served = operationPath(field.slot, field.name);
222
- // `${method} ${served}` and `endpointQsp(method, served)` are the two
223
- // minting sites `DEC-317` fixed, spelled here exactly as
224
- // `adapter-python`'s `emitDjangoRoute` spells them. The two-producer test
225
- // is what holds them equal; this comment is not.
174
+ // `${method} ${served}` / `endpointQsp(...)` are DEC-317's two minting
175
+ // sites, spelled to match adapter-python's emitDjangoRoute exactly.
226
176
  const routeId = nodeId(scope, "API_ROUTE", `${GRAPHQL_METHOD} ${served}`, LANGUAGE);
227
177
  if (!nodes.has(routeId)) {
228
178
  anchorId ??= routeId;
@@ -244,11 +194,8 @@ function build(units, repoRoot, reached) {
244
194
  },
245
195
  });
246
196
  }
247
- // Fileless AND language-less. This node is where an SDL-derived operation
248
- // and a strawberry-derived one for the same real operation meet, and
249
- // `nodeId` throws if a fileless type is hashed with a language — the guard
250
- // against an id whose only symptom would be a join that silently does not
251
- // happen.
197
+ // Fileless and language-less — where SDL- and strawberry-derived
198
+ // operations meet. nodeId throws if a fileless type carries a language.
252
199
  const endpointId = nodeId(scope, "API_ENDPOINT", endpointQsp(GRAPHQL_METHOD, served), null);
253
200
  if (!nodes.has(endpointId)) {
254
201
  nodes.set(endpointId, {
@@ -272,9 +219,8 @@ function build(units, repoRoot, reached) {
272
219
  confidence: 0.95,
273
220
  });
274
221
  }
275
- // Every refusal, anchored to a node the batch actually contains. A ledger
276
- // entry naming a node that was never emitted is a dangling reference
277
- // dressed up as a disclosure.
222
+ // Anchor every refusal to a node the batch contains — an entry naming an
223
+ // unemitted node is a dangling reference dressed up as a disclosure.
278
224
  if (anchorId === undefined)
279
225
  continue;
280
226
  for (const refusal of schema.refused) {
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,WAAW,EACX,MA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L document, and why this is the *strong* half of the
3
- * GraphQL story rather than a convenience.
2
+ * Reading a GraphQL SDL document — the *strong* half of the GraphQL story,
3
+ * not a convenience.
4
4
  *
5
- * `DEC-317` built GraphQL operation identity for Python/strawberry, and was
6
- * explicit about the compromise it had to make. gRPC's precedent
7
- * (`DEC-316`) rests on **"the path is read, not assembled"** — protoc writes
8
- * `Service_Method_FullMethodName = "/pkg.Service/Method"` and the reader takes
9
- * that literal verbatim. strawberry writes no such artifact: the schema is
10
- * built at import time out of the class structure, the schema-facing name is
11
- * camel-cased by default, and so `DEC-317` had to narrow itself to the three
12
- * cases in which a name is genuinely *read* and refuse the rest as
13
- * `graphqlFieldNameNotReadable`.
5
+ * DEC-317 built GraphQL identity for Python/strawberry and had to
6
+ * compromise: strawberry writes no artifact, names are camel-cased by
7
+ * default, so it narrowed itself to three readable cases and refused the
8
+ * rest (`graphqlFieldNameNotReadable`). An SDL field name IS the
9
+ * schema-facing name — nothing to compute, resolve, or refuse. DEC-317
10
+ * itself calls an SDL artifact preferable "over this mechanism outright" —
11
+ * this reader is that preference, built.
14
12
  *
15
- * **An SDL artifact removes the compromise entirely.** A field name in SDL is
16
- * the schema-facing name — not a Python attribute that a naming converter will
17
- * later transform, not a value a default might change, but the string the
18
- * server publishes and a client types. There is nothing to compute, nothing to
19
- * resolve and nothing to refuse on naming grounds. `DEC-317` §"The three
20
- * sub-questions" says so outright: where an SDL artifact exists it "**is** the
21
- * protoc-const analogue and should be preferred over this mechanism outright".
22
- * This reader is that preference, built.
13
+ * ## Why a lexer, not a regex
23
14
  *
24
- * ## Why a lexer and not a regex
25
- *
26
- * The naive rule — *a `Name` followed by `:` inside a type body is a field* —
27
- * fails on the first real schema it meets, in four separate ways that Saleor's
28
- * `saleor/graphql/schema.graphql` contains thousands of instances of:
29
- *
30
- * | construct | what the naive rule does |
31
- * | --- | --- |
32
- * | `webhook(id: ID!, filter: F = { channel: "x" }): Webhook` | emits `id`, `filter` and `channel` as operations |
33
- * | `webhookEvents: [E!] @doc(category: "Webhooks")` | emits `category` |
34
- * | `"""A description with a { brace and a colon: here."""` | emits whatever the prose contains |
35
- * | `# a comment` | the same |
36
- *
37
- * So the document is tokenised properly — block strings, strings, comments and
38
- * punctuation — and a field is admitted only in the one position the grammar
39
- * puts one: a `Name`, at the type body's own brace depth and outside every
40
- * parenthesis, followed (past a balanced argument list, if it has one) by `:`.
15
+ * "A `Name` followed by `:` in a type body is a field" fails on real
16
+ * schemas — argument lists, default-value braces, directive args,
17
+ * block-string prose and comments all shadow that shape; Saleor's
18
+ * `schema.graphql` alone has thousands of such cases. So the document is
19
+ * tokenised properly and a field is admitted only where the grammar puts
20
+ * one: a `Name` at the type body's own depth, outside every parenthesis,
21
+ * followed (past a balanced argument list) by `:`.
41
22
  *
42
23
  * ## Declared limits
43
24
  *
44
- * **`.graphql`/`.gql` only — an introspection `schema.json` is not read.**
45
- * `DEC-317` names it as a third artifact that could carry the same truth, and
46
- * it could. It is not built because **no repository on hand contains one**: a
47
- * census of 52 reference repositories plus Saleor found two `.graphql` files
48
- * and zero GraphQL introspection JSON documents. Building a second format
49
- * reader against documentation with no source to measure it on is the thing
50
- * `DEC-317`'s own graphene paragraph refuses to do, and it would be no more
51
- * defensible here. Disclosed gap, not a silent one.
25
+ * **`.graphql`/`.gql` only — no introspection `schema.json`.** A census of
26
+ * 52 reference repos plus Saleor found two `.graphql` files and zero
27
+ * introspection JSON documents. Disclosed gap.
52
28
  *
53
- * **One file is one document.** A schema block naming a root type that the same
54
- * file does not declare earns a ledger row rather than a search of the other
55
- * `.graphql` files in the repository. SDL *can* legally be split across files,
56
- * and where it is this reader under-reports and says so; both real artifacts
57
- * measured here are single-file, so cross-file stitching would be reach built
58
- * against zero demand, and a wrong stitch — pairing a schema block with a
59
- * same-named type from an unrelated schema — is a silently wrong answer rather
60
- * than a missing one.
29
+ * **One file is one document — no cross-file stitching.** SDL can legally
30
+ * split across files; where it does, this reader under-reports and says so.
61
31
  *
62
- * **Executable documents are not schemas.** A `.graphql` file holding
63
- * `query IntrospectionQuery { ... }` or a fragment is a *client* document;
64
- * twenty ships exactly one. It yields no type-system definition, so it yields
65
- * no schema, and `readSchema` returns `undefined` rather than minting
66
- * operations named after an introspection payload.
32
+ * **Executable documents are not schemas.** A `.graphql` file holding a
33
+ * query or fragment (twenty ships one) yields no type-system definition, so
34
+ * `readSchema` returns `undefined` instead of minting operations named
35
+ * after an introspection payload.
67
36
  */
68
37
  /** GraphQL's three root operation types, fixed by the specification. */
69
38
  export declare const OPERATION_SLOTS: readonly ["query", "mutation", "subscription"];
70
39
  export type OperationSlot = (typeof OPERATION_SLOTS)[number];
71
40
  /**
72
- * The path segment each slot contributes, and the type name each slot defaults
73
- * to when the document declares no `schema` block.
74
- *
75
- * **These two columns are the same word for a reason, and it is not a
76
- * coincidence worth collapsing.** The left is GraphQL's operation-type
77
- * vocabulary, which `DEC-317` puts in the path; the right is the specification's
78
- * default root type name (October 2021 §3.3.1), which a `schema` block may
79
- * override. Saleor overrides nothing and still writes the block; twenty writes
80
- * no block at all. Keeping them apart is what makes `schema { query: RootQuery }`
81
- * yield `/Query/…` rather than `/RootQuery/…`.
41
+ * The path segment each slot contributes, and the default root type name
42
+ * when no `schema` block overrides it (spec Oct 2021 §3.3.1) — kept
43
+ * distinct so `schema { query: RootQuery }` yields `/Query/…`, not `/RootQuery/…`.
82
44
  */
83
45
  export declare const OPERATION_TYPE: Readonly<Record<OperationSlot, string>>;
84
46
  export interface Refusal {
@@ -88,11 +50,7 @@ export interface Refusal {
88
50
  }
89
51
  export interface RootField {
90
52
  readonly slot: OperationSlot;
91
- /**
92
- * The schema-facing name, **read verbatim**. There is no other kind here —
93
- * that is the whole reason this adapter is worth more than the class-structure
94
- * mechanism it supersedes.
95
- */
53
+ /** The schema-facing name, read verbatim — why this reader beats the class-structure mechanism it supersedes. */
96
54
  readonly name: string;
97
55
  readonly line: number;
98
56
  }
@@ -104,12 +62,7 @@ export interface Schema {
104
62
  readonly fields: ReadonlyMap<string, readonly RootField[]>;
105
63
  readonly refused: readonly Refusal[];
106
64
  }
107
- /**
108
- * The type-system definitions of one document.
109
- *
110
- * Returns `undefined` when the text yields no root operation type at all —
111
- * an executable document, a fragment library, or a file that is not SDL.
112
- */
65
+ /** The type-system definitions of one document; returns `undefined` when it yields no root operation type (executable document, fragment, non-SDL text). */
113
66
  export declare function readSchema(text: string): Schema | undefined;
114
67
  /** Every root operation the document declares, in slot then declaration order. */
115
68
  export declare function rootFieldsOf(schema: Schema): readonly RootField[];
@@ -1 +1 @@
1
- {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../src/document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,wEAAwE;AACxE,eAAO,MAAM,eAAe,gDAAiD,CAAC;AAC9E,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAIlE,CAAC;AAIF,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,MAAM;IACrB,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACnD,yFAAyF;IACzF,QAAQ,CAAC,aAAa,EAAE,OAAO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,WAAW,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC,CAAC;IAC3D,QAAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAC;CACtC;AA+LD,4JAA4J;AAC5J,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAoH3D;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,SAAS,EAAE,CAQjE"}
package/dist/document.js CHANGED
@@ -1,83 +1,45 @@
1
1
  /**
2
- * Reading a GraphQL SDL document, and why this is the *strong* half of the
3
- * GraphQL story rather than a convenience.
2
+ * Reading a GraphQL SDL document — the *strong* half of the GraphQL story,
3
+ * not a convenience.
4
4
  *
5
- * `DEC-317` built GraphQL operation identity for Python/strawberry, and was
6
- * explicit about the compromise it had to make. gRPC's precedent
7
- * (`DEC-316`) rests on **"the path is read, not assembled"** — protoc writes
8
- * `Service_Method_FullMethodName = "/pkg.Service/Method"` and the reader takes
9
- * that literal verbatim. strawberry writes no such artifact: the schema is
10
- * built at import time out of the class structure, the schema-facing name is
11
- * camel-cased by default, and so `DEC-317` had to narrow itself to the three
12
- * cases in which a name is genuinely *read* and refuse the rest as
13
- * `graphqlFieldNameNotReadable`.
5
+ * DEC-317 built GraphQL identity for Python/strawberry and had to
6
+ * compromise: strawberry writes no artifact, names are camel-cased by
7
+ * default, so it narrowed itself to three readable cases and refused the
8
+ * rest (`graphqlFieldNameNotReadable`). An SDL field name IS the
9
+ * schema-facing name — nothing to compute, resolve, or refuse. DEC-317
10
+ * itself calls an SDL artifact preferable "over this mechanism outright" —
11
+ * this reader is that preference, built.
14
12
  *
15
- * **An SDL artifact removes the compromise entirely.** A field name in SDL is
16
- * the schema-facing name — not a Python attribute that a naming converter will
17
- * later transform, not a value a default might change, but the string the
18
- * server publishes and a client types. There is nothing to compute, nothing to
19
- * resolve and nothing to refuse on naming grounds. `DEC-317` §"The three
20
- * sub-questions" says so outright: where an SDL artifact exists it "**is** the
21
- * protoc-const analogue and should be preferred over this mechanism outright".
22
- * This reader is that preference, built.
13
+ * ## Why a lexer, not a regex
23
14
  *
24
- * ## Why a lexer and not a regex
25
- *
26
- * The naive rule — *a `Name` followed by `:` inside a type body is a field* —
27
- * fails on the first real schema it meets, in four separate ways that Saleor's
28
- * `saleor/graphql/schema.graphql` contains thousands of instances of:
29
- *
30
- * | construct | what the naive rule does |
31
- * | --- | --- |
32
- * | `webhook(id: ID!, filter: F = { channel: "x" }): Webhook` | emits `id`, `filter` and `channel` as operations |
33
- * | `webhookEvents: [E!] @doc(category: "Webhooks")` | emits `category` |
34
- * | `"""A description with a { brace and a colon: here."""` | emits whatever the prose contains |
35
- * | `# a comment` | the same |
36
- *
37
- * So the document is tokenised properly — block strings, strings, comments and
38
- * punctuation — and a field is admitted only in the one position the grammar
39
- * puts one: a `Name`, at the type body's own brace depth and outside every
40
- * parenthesis, followed (past a balanced argument list, if it has one) by `:`.
15
+ * "A `Name` followed by `:` in a type body is a field" fails on real
16
+ * schemas — argument lists, default-value braces, directive args,
17
+ * block-string prose and comments all shadow that shape; Saleor's
18
+ * `schema.graphql` alone has thousands of such cases. So the document is
19
+ * tokenised properly and a field is admitted only where the grammar puts
20
+ * one: a `Name` at the type body's own depth, outside every parenthesis,
21
+ * followed (past a balanced argument list) by `:`.
41
22
  *
42
23
  * ## Declared limits
43
24
  *
44
- * **`.graphql`/`.gql` only — an introspection `schema.json` is not read.**
45
- * `DEC-317` names it as a third artifact that could carry the same truth, and
46
- * it could. It is not built because **no repository on hand contains one**: a
47
- * census of 52 reference repositories plus Saleor found two `.graphql` files
48
- * and zero GraphQL introspection JSON documents. Building a second format
49
- * reader against documentation with no source to measure it on is the thing
50
- * `DEC-317`'s own graphene paragraph refuses to do, and it would be no more
51
- * defensible here. Disclosed gap, not a silent one.
25
+ * **`.graphql`/`.gql` only — no introspection `schema.json`.** A census of
26
+ * 52 reference repos plus Saleor found two `.graphql` files and zero
27
+ * introspection JSON documents. Disclosed gap.
52
28
  *
53
- * **One file is one document.** A schema block naming a root type that the same
54
- * file does not declare earns a ledger row rather than a search of the other
55
- * `.graphql` files in the repository. SDL *can* legally be split across files,
56
- * and where it is this reader under-reports and says so; both real artifacts
57
- * measured here are single-file, so cross-file stitching would be reach built
58
- * against zero demand, and a wrong stitch — pairing a schema block with a
59
- * same-named type from an unrelated schema — is a silently wrong answer rather
60
- * than a missing one.
29
+ * **One file is one document — no cross-file stitching.** SDL can legally
30
+ * split across files; where it does, this reader under-reports and says so.
61
31
  *
62
- * **Executable documents are not schemas.** A `.graphql` file holding
63
- * `query IntrospectionQuery { ... }` or a fragment is a *client* document;
64
- * twenty ships exactly one. It yields no type-system definition, so it yields
65
- * no schema, and `readSchema` returns `undefined` rather than minting
66
- * operations named after an introspection payload.
32
+ * **Executable documents are not schemas.** A `.graphql` file holding a
33
+ * query or fragment (twenty ships one) yields no type-system definition, so
34
+ * `readSchema` returns `undefined` instead of minting operations named
35
+ * after an introspection payload.
67
36
  */
68
37
  /** GraphQL's three root operation types, fixed by the specification. */
69
38
  export const OPERATION_SLOTS = ["query", "mutation", "subscription"];
70
39
  /**
71
- * The path segment each slot contributes, and the type name each slot defaults
72
- * to when the document declares no `schema` block.
73
- *
74
- * **These two columns are the same word for a reason, and it is not a
75
- * coincidence worth collapsing.** The left is GraphQL's operation-type
76
- * vocabulary, which `DEC-317` puts in the path; the right is the specification's
77
- * default root type name (October 2021 §3.3.1), which a `schema` block may
78
- * override. Saleor overrides nothing and still writes the block; twenty writes
79
- * no block at all. Keeping them apart is what makes `schema { query: RootQuery }`
80
- * yield `/Query/…` rather than `/RootQuery/…`.
40
+ * The path segment each slot contributes, and the default root type name
41
+ * when no `schema` block overrides it (spec Oct 2021 §3.3.1) — kept
42
+ * distinct so `schema { query: RootQuery }` yields `/Query/…`, not `/RootQuery/…`.
81
43
  */
82
44
  export const OPERATION_TYPE = {
83
45
  query: "Query",
@@ -87,16 +49,7 @@ export const OPERATION_TYPE = {
87
49
  const DEFAULT_ROOT_TYPE = OPERATION_TYPE;
88
50
  const isNameStart = (c) => /[_A-Za-z]/.test(c);
89
51
  const isNameChar = (c) => /[_0-9A-Za-z]/.test(c);
90
- /**
91
- * Tokens, with comments and commas dropped.
92
- *
93
- * Numbers and the rest of the value grammar are deliberately *not* classified:
94
- * nothing this reader decides depends on telling `1` from `x`, and every value
95
- * it might meet sits inside a parenthesis or a brace it is already skipping.
96
- * A digit run therefore falls through to the single-character `punct` arm,
97
- * which is harmless — it can never be mistaken for a `name`, which is the only
98
- * classification that carries a decision.
99
- */
52
+ /** Tokens, with comments and commas dropped; numbers aren't classified — a digit run falls through to `punct` harmlessly, never mistaken for a `name`. */
100
53
  function tokenise(text) {
101
54
  const tokens = [];
102
55
  let index = 0;
@@ -112,8 +65,7 @@ function tokenise(text) {
112
65
  index += 1;
113
66
  continue;
114
67
  }
115
- // A comment runs to end of line and can say anything at all, including
116
- // something shaped exactly like a field.
68
+ // Runs to end of line — can contain text shaped exactly like a field.
117
69
  if (char === "#") {
118
70
  while (index < text.length && text[index] !== "\n")
119
71
  index += 1;
@@ -121,9 +73,8 @@ function tokenise(text) {
121
73
  }
122
74
  if (char === '"') {
123
75
  const startLine = line;
124
- // A block string is the case that matters: Saleor's descriptions contain
125
- // braces, quotes and colons, and a reader that scanned to the next `"`
126
- // would resume parsing in the middle of prose.
76
+ // Block strings matter: Saleor's descriptions contain braces, quotes,
77
+ // colons — scanning to the next `"` would resume parsing mid-prose.
127
78
  if (text.startsWith('"""', index)) {
128
79
  index += 3;
129
80
  while (index < text.length) {
@@ -185,13 +136,9 @@ function skipBalanced(tokens, from, open, close) {
185
136
  return tokens.length;
186
137
  }
187
138
  /**
188
- * The fields a type body declares, read from the token just past its `{`.
189
- *
190
- * A field is a `Name` at the body's own depth, outside every parenthesis,
191
- * followed — past its argument list if it has one — by `:`. That trailing colon
192
- * is what does the precision work: `@doc(category: "x")` puts `doc` in exactly
193
- * the same position as a field name and is separated from one only by what
194
- * comes after its parentheses.
139
+ * Fields declared by a type body, from just past its `{` — a `Name` at the
140
+ * body's own depth outside every parenthesis, followed (past its arg list)
141
+ * by `:`. That trailing colon: `@doc(category: "x")` puts `doc` in the same spot.
195
142
  */
196
143
  function fieldsIn(tokens, bodyStart) {
197
144
  const fields = [];
@@ -214,8 +161,7 @@ function fieldsIn(tokens, bodyStart) {
214
161
  index = skipBalanced(tokens, index, "(", ")");
215
162
  continue;
216
163
  }
217
- // `@` — the directive's own name follows and is not a field. Skipping it
218
- // here is belt-and-braces: the trailing-colon test already rejects it.
164
+ // `@directive` name isn't a field; belt-and-braces (trailing-colon test already rejects it).
219
165
  if (token.value === "@") {
220
166
  index += 2;
221
167
  continue;
@@ -262,9 +208,8 @@ function readSchemaBlock(tokens, bodyStart, roots, refused) {
262
208
  index += 3;
263
209
  continue;
264
210
  }
265
- // `query: [Query]` and friends. Legal SDL forbids it, but a hand-edited or
266
- // generated document can contain anything, and picking the name out of a
267
- // wrapper would be a guess about what the server actually serves.
211
+ // `query: [Query]` etc. Legal SDL forbids it, but generated/hand-edited
212
+ // docs can contain anything; picking a name out of a wrapper would guess.
268
213
  refused.push({
269
214
  what: slot,
270
215
  why: `the schema block's ${slot} slot is not a bare type name, so the root type it names cannot be read`,
@@ -274,12 +219,7 @@ function readSchemaBlock(tokens, bodyStart, roots, refused) {
274
219
  }
275
220
  return index;
276
221
  }
277
- /**
278
- * The type-system definitions of one document.
279
- *
280
- * Returns `undefined` when the text yields no root operation type at all —
281
- * an executable document, a fragment library, or a file that is not SDL.
282
- */
222
+ /** The type-system definitions of one document; returns `undefined` when it yields no root operation type (executable document, fragment, non-SDL text). */
283
223
  export function readSchema(text) {
284
224
  const tokens = tokenise(text);
285
225
  const roots = new Map();
@@ -295,8 +235,7 @@ export function readSchema(text) {
295
235
  continue;
296
236
  }
297
237
  if (token.value === "schema") {
298
- // `schema @link(...) { … }` is legal; skip to the body the same way a
299
- // type definition's directives are skipped.
238
+ // `schema @link(...) { … }` is legal — skip directives same as a type definition.
300
239
  let cursor = index + 1;
301
240
  while (cursor < tokens.length) {
302
241
  const next = tokens[cursor];
@@ -318,8 +257,7 @@ export function readSchema(text) {
318
257
  index += 1;
319
258
  continue;
320
259
  }
321
- // `type X` and `extend type X`. Only object types can be a root operation
322
- // type — an `input`, `interface`, `enum`, `union` or `scalar` never is.
260
+ // type X / extend type X — only object types can be a root operation type.
323
261
  const isExtend = token.value === "extend" && tokens[index + 1]?.value === "type";
324
262
  if (token.value !== "type" && !isExtend) {
325
263
  index += 1;
@@ -340,8 +278,7 @@ export function readSchema(text) {
340
278
  }
341
279
  if (next.kind === "punct" && next.value === "{")
342
280
  break;
343
- // A type extension may have no body at all (`extend type X @dir`), and a
344
- // bare `type X` ends where the next definition begins.
281
+ // `extend type X @dir` may have no body; a bare `type X` ends at the next definition.
345
282
  if (next.kind === "name" && (next.value === "type" || next.value === "extend" || next.value === "schema")) {
346
283
  break;
347
284
  }
@@ -363,21 +300,15 @@ export function readSchema(text) {
363
300
  if (!sawTypeDefinition)
364
301
  return undefined;
365
302
  if (!sawSchemaBlock) {
366
- // The specification's defaults. This assembles no name that is not written
367
- // in the file: the *field* names are still read verbatim, and the three
368
- // root type words are GraphQL's own, fixed by the grammar — the same
369
- // footing on which `DEC-317` assembles the `/Query/` prefix from a slot.
303
+ // Spec defaults only — field names still read verbatim; the three root
304
+ // type words are GraphQL's own grammar, same footing DEC-317 uses for `/Query/`.
370
305
  for (const slot of OPERATION_SLOTS) {
371
306
  if (byType.has(DEFAULT_ROOT_TYPE[slot]))
372
307
  roots.set(slot, DEFAULT_ROOT_TYPE[slot]);
373
308
  }
374
309
  }
375
- // **Not `roots.size === 0`.** A document whose `schema` block declares roots
376
- // this reader could not read has zero roots and something to say, and
377
- // returning `undefined` there would drop the refusal on the floor — the
378
- // adapter would report "no GraphQL here" about a file that plainly contains
379
- // a schema. Silence is what rule 7 forbids; the empty result must arrive
380
- // carrying its reasons.
310
+ // Not `roots.size === 0`: unreadable-but-named roots have zero roots and
311
+ // something to say — returning undefined here would drop the refusal (rule 7).
381
312
  if (roots.size === 0 && refused.length === 0)
382
313
  return undefined;
383
314
  const fields = new Map();
@@ -392,8 +323,7 @@ export function readSchema(text) {
392
323
  });
393
324
  continue;
394
325
  }
395
- // Illegal in valid SDL, but a duplicate would otherwise report one
396
- // operation twice and inflate every count this adapter is measured by.
326
+ // Illegal in valid SDL, but a duplicate would otherwise double-count.
397
327
  const seen = new Set();
398
328
  fields.set(typeName, declared
399
329
  .filter((field) => (seen.has(field.name) ? false : (seen.add(field.name), true)))
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","sourceRoot":"","sources":["../src/document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,wEAAwE;AACxE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,cAAc,CAAU,CAAC;AAG9E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAA4C;IACrE,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;CAC7B,CAAC;AAEF,MAAM,iBAAiB,GAA4C,cAAc,CAAC;AAsClF,MAAM,WAAW,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAChE,MAAM,UAAU,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAElE;;;;;;;;;GASG;AACH,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,IAAI,GAAG,CAAC,CAAC;IAEb,OAAO,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3B,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AAC;IAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACnE,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,MAAM,GAAG,GAAgB,EAAE,CAAC;IAC5B,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,QAAQ,KAAK,SAAS;YAAE,SAAS;QACrC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,18 @@
1
1
  {
2
2
  "name": "@descryy/adapter-graphql",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "GraphQL SDL adapter. Reaches R3 with no language adapter at all \u2014 a published schema states its own operations, and their names are read rather than computed.",
6
6
  "license": "UNLICENSED",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/descryhq-wq/descry-adapters.git",
10
+ "directory": "packages/adapter-graphql"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/descryhq-wq/descry-adapters/issues"
14
+ },
15
+ "homepage": "https://github.com/descryhq-wq/descry-adapters#readme",
7
16
  "engines": {
8
17
  "node": ">=22.5"
9
18
  },
@@ -24,8 +33,8 @@
24
33
  "build": "tsc -b"
25
34
  },
26
35
  "dependencies": {
27
- "@descryy/adapter-common": "0.1.0",
28
- "@descryy/ir": "0.3.0",
29
- "@descryy/adapter-python": "0.1.0"
36
+ "@descryy/adapter-common": "0.2.0",
37
+ "@descryy/ir": "0.5.0",
38
+ "@descryy/adapter-python": "0.3.0"
30
39
  }
31
40
  }