@descryy/adapter-python 0.2.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 +8 -0
- package/dist/adapter.d.ts +13 -20
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +91 -114
- package/dist/adapter.js.map +1 -1
- package/dist/client.d.ts +22 -41
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +35 -62
- package/dist/client.js.map +1 -1
- package/dist/extract.d.ts +16 -0
- package/dist/extract.d.ts.map +1 -1
- package/dist/extract.js +81 -5
- package/dist/extract.js.map +1 -1
- package/dist/extract.py +45 -4
- package/dist/graphql.d.ts +57 -123
- package/dist/graphql.d.ts.map +1 -1
- package/dist/graphql.js +62 -130
- package/dist/graphql.js.map +1 -1
- package/dist/module.d.ts +23 -42
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +26 -47
- package/dist/module.js.map +1 -1
- package/dist/orm.d.ts +31 -46
- package/dist/orm.d.ts.map +1 -1
- package/dist/orm.js +53 -89
- package/dist/orm.js.map +1 -1
- package/dist/pydantic.d.ts +76 -91
- package/dist/pydantic.d.ts.map +1 -1
- package/dist/pydantic.js +106 -99
- package/dist/pydantic.js.map +1 -1
- package/dist/routes.d.ts +46 -93
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +65 -129
- package/dist/routes.js.map +1 -1
- package/package.json +14 -5
- package/src/extract.py +45 -4
package/dist/graphql.d.ts
CHANGED
|
@@ -2,78 +2,37 @@
|
|
|
2
2
|
* The GraphQL root-operation extractor for Python — strawberry and
|
|
3
3
|
* strawberry-django.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* (`
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* -
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* | strawberry's own rule | consequence here |
|
|
31
|
-
* | --- | --- |
|
|
32
|
-
* | `NameConverter.auto_camel_case` defaults to **True** | `circuit_list` is served as `circuitList` |
|
|
33
|
-
* | an explicit `graphql_name` returns before `apply_naming_config` | `field(name="allCircuits")` is the name, verbatim |
|
|
34
|
-
* | `to_camel_case` is `s.split("_")`, rejoined | a name with **no** `_` is unchanged by it |
|
|
35
|
-
*
|
|
36
|
-
* So this reader admits a field **only when its schema-facing name can be read
|
|
37
|
-
* verbatim out of the source** — the three rows above give exactly three such
|
|
38
|
-
* cases, and `readFieldName` is the whole rule. Anything else is refused and
|
|
39
|
-
* disclosed. **The reader never computes a name.** Writing `circuitList` — a
|
|
40
|
-
* string that appears nowhere in the repository — because a library default
|
|
41
|
-
* says it should is precisely the DEC-055 shape both decisions exist to
|
|
42
|
-
* prevent: everything normalises, everything resolves, and the join is silently
|
|
43
|
-
* zero because the consumer half read the real wire name and this half invented
|
|
44
|
-
* a plausible one.
|
|
45
|
-
*
|
|
46
|
-
* The half that *is* still assembled is the `/Query/` prefix, and it is
|
|
47
|
-
* assembled out of the schema call's own slot keyword (`query=`/`mutation=`/
|
|
48
|
-
* `subscription=`) rather than out of any Python name. The three operation-type
|
|
49
|
-
* words are GraphQL's, fixed by the specification, and a client addresses an
|
|
50
|
-
* operation by its slot — never by the root class's name. That is why a class
|
|
51
|
-
* decorated `@strawberry.type(name="Query")` sitting in the `mutation=` slot
|
|
52
|
-
* yields `/Mutation/...` here, and why netbox's ten mixins all decorated
|
|
53
|
-
* `name="Query"` are read through the slot their root occupies rather than
|
|
54
|
-
* through a decorator that strawberry itself discards for a base class.
|
|
55
|
-
*
|
|
56
|
-
* ## The provenance rule, which does the precision work
|
|
57
|
-
*
|
|
58
|
-
* A field becomes an operation only when **a `strawberry.Schema(...)` call,
|
|
59
|
-
* whose callee resolves through the import table to strawberry's own module,
|
|
60
|
-
* puts its class in a root slot.** Not because a class is decorated
|
|
61
|
-
* `@strawberry.type` — netbox has 34 of those and 10 are root mixins — and
|
|
62
|
-
* never because an attribute is spelled like a field. This is `routes.ts`'s
|
|
63
|
-
* "the receiver must resolve to a router constructed from a web framework's own
|
|
64
|
-
* module" rule in a second spelling, and it is the same lesson: a node type
|
|
65
|
-
* comes from provenance or from nothing.
|
|
66
|
-
*
|
|
67
|
-
* The split with `extract.py` is this adapter's standing one — the Python side
|
|
68
|
-
* records syntactic form and names no framework, every decision about what a
|
|
69
|
-
* form *means* is taken here.
|
|
5
|
+
* Identity: `API_ROUTE`/`API_ENDPOINT` is `METHOD /path`, but a GraphQL field
|
|
6
|
+
* has neither. `DEC-NEXT-graphql-operation-identity` settles it by
|
|
7
|
+
* transposing the gRPC precedent (`DEC-NEXT-grpc-route-identity`): `method`
|
|
8
|
+
* is the literal sentinel `"GRAPHQL"` (not load-bearing for identity, just
|
|
9
|
+
* a hint to a reader of `attrs.method`), and path is `/<OperationType>/<field>`
|
|
10
|
+
* (`/Query/circuit`, `/Mutation/create_order`).
|
|
11
|
+
*
|
|
12
|
+
* Departure from gRPC's precedent: protoc writes the path as a literal
|
|
13
|
+
* (`Service_Method_FullMethodName`), but strawberry writes no such artifact —
|
|
14
|
+
* the schema-facing field name can differ from the Python name
|
|
15
|
+
* (`auto_camel_case` defaults true, an explicit `graphql_name` wins, a
|
|
16
|
+
* no-underscore name is unchanged either way). So a field is admitted only
|
|
17
|
+
* when its schema-facing name can be read verbatim from source
|
|
18
|
+
* (`readFieldName` is the whole rule) — never computed, since a computed
|
|
19
|
+
* `circuitList` nowhere in the repository is exactly DEC-055's silent-zero-join
|
|
20
|
+
* failure. The `/Query/` prefix IS assembled, but from the schema call's own
|
|
21
|
+
* slot keyword (`query=`/`mutation=`/`subscription=`), never the class's
|
|
22
|
+
* name — netbox decorates ten root mixins `name="Query"` but they're read by
|
|
23
|
+
* slot, since strawberry itself discards that decorator for a base class.
|
|
24
|
+
*
|
|
25
|
+
* Provenance rule: a field is an operation only when a `strawberry.Schema(...)`
|
|
26
|
+
* call resolving through the import table puts its class in a root slot —
|
|
27
|
+
* never from `@strawberry.type` alone (netbox has 34, 10 are root mixins) —
|
|
28
|
+
* mirroring `routes.ts`'s router-provenance rule. `extract.py` records
|
|
29
|
+
* syntactic form and names no framework; every "what does this form mean" decision is here.
|
|
70
30
|
*/
|
|
71
31
|
import type { PyCall } from "./extract.ts";
|
|
72
32
|
import type { PyAttribute } from "./orm.ts";
|
|
73
33
|
/**
|
|
74
|
-
* The protocol sentinel
|
|
75
|
-
*
|
|
76
|
-
* the operation type is carried in the path where gRPC carries the service.
|
|
34
|
+
* The protocol sentinel, per `DEC-NEXT-grpc-route-identity`'s `"RPC"` — not
|
|
35
|
+
* split by operation type, which the path already carries.
|
|
77
36
|
*/
|
|
78
37
|
export declare const GRAPHQL_METHOD = "GRAPHQL";
|
|
79
38
|
/** GraphQL's three root operation types, fixed by the specification. */
|
|
@@ -82,56 +41,39 @@ export type OperationSlot = (typeof OPERATION_SLOTS)[number];
|
|
|
82
41
|
/** The path segment each slot contributes — the specification's own spelling. */
|
|
83
42
|
export declare const OPERATION_TYPE: Readonly<Record<OperationSlot, string>>;
|
|
84
43
|
/**
|
|
85
|
-
* The modules a `Schema` must come from
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* for `Blueprint`.
|
|
44
|
+
* The modules a `Schema` must come from — the precision control, since a
|
|
45
|
+
* local class called `Schema` isn't strawberry's (the same trap
|
|
46
|
+
* `ROUTER_CONSTRUCTORS` guards against for `Blueprint`).
|
|
89
47
|
*/
|
|
90
48
|
export declare const SCHEMA_MODULES: ReadonlySet<string>;
|
|
91
49
|
/** The modules a field constructor must come from, for the same reason. */
|
|
92
50
|
export declare const FIELD_MODULES: ReadonlySet<string>;
|
|
93
51
|
/**
|
|
94
|
-
* The field constructors read as declaring a root operation.
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* name rule. Relay's `node`/`connection` are **not** here: no repository on
|
|
101
|
-
* hand writes them, and a constructor admitted from documentation rather than
|
|
102
|
-
* from a counted repository is a case that was imagined.
|
|
52
|
+
* The field constructors read as declaring a root operation. Deliberately
|
|
53
|
+
* short: `field` covers netbox's 246 root operations (the only form with
|
|
54
|
+
* corpus evidence), `mutation` is strawberry's unambiguous mutation-slot
|
|
55
|
+
* constructor. Relay's `node`/`connection` are absent — no repository on
|
|
56
|
+
* hand writes them, and admitting from documentation rather than a counted
|
|
57
|
+
* repository is an imagined case.
|
|
103
58
|
*/
|
|
104
59
|
export declare const FIELD_CONSTRUCTORS: ReadonlySet<string>;
|
|
105
60
|
/** The class decorator that makes a class a GraphQL type at all. */
|
|
106
61
|
export declare const TYPE_DECORATORS: ReadonlySet<string>;
|
|
107
62
|
/**
|
|
108
63
|
* What this run could establish about how strawberry spells a field's name.
|
|
109
|
-
*
|
|
110
|
-
* `
|
|
111
|
-
*
|
|
112
|
-
* variable, leave the disposition genuinely unresolved. It is kept apart from
|
|
113
|
-
* `"camel"` so the reason a field was refused stays truthful, even though both
|
|
114
|
-
* states refuse the same fields.
|
|
64
|
+
* `"unknown"` is a real third state, not a default synonym — two
|
|
65
|
+
* `StrawberryConfig` calls, or a config passed as a variable, leave this
|
|
66
|
+
* genuinely unresolved, even though it refuses the same fields as `"camel"`.
|
|
115
67
|
*/
|
|
116
68
|
export type FieldNaming = "verbatim" | "camel" | "unknown";
|
|
117
69
|
/**
|
|
118
|
-
* The schema-facing name of a field,
|
|
119
|
-
* mean computing it.
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* - `get_graphql_name` returns `obj.graphql_name` *before* `apply_naming_config`
|
|
126
|
-
* is ever called, so an explicit `name=` is the answer under every config.
|
|
127
|
-
* - with `auto_camel_case=False`, `apply_naming_config` is the identity.
|
|
128
|
-
* - `to_camel_case(s)` is `s.split("_")` rejoined, so for a name containing no
|
|
129
|
-
* `_` it is the identity too — which is why an underscore-free field is
|
|
130
|
-
* readable even when this run could not resolve the config at all.
|
|
131
|
-
*
|
|
132
|
-
* There is no fourth branch, and there must not be one: the only way to answer
|
|
133
|
-
* the remaining case is to run strawberry's transform, and the result would be
|
|
134
|
-
* a string that is not written anywhere in the repository.
|
|
70
|
+
* The schema-facing name of a field, read — or `null` when stating it would
|
|
71
|
+
* mean computing it. Every branch mirrors a line of strawberry's own
|
|
72
|
+
* `name_converter.py`: an explicit `name=` always wins (`get_graphql_name`
|
|
73
|
+
* runs before `apply_naming_config`); `auto_camel_case=False` is the
|
|
74
|
+
* identity; and an underscore-free name is unchanged by `to_camel_case`
|
|
75
|
+
* regardless. No fourth branch — answering the remaining case means running
|
|
76
|
+
* strawberry's transform and writing a string that appears nowhere in the repository.
|
|
135
77
|
*/
|
|
136
78
|
export declare function readFieldName(attributeName: string, explicitName: string | null, naming: FieldNaming): string | null;
|
|
137
79
|
/** A `strawberry.Schema(...)` call, as the source states it. */
|
|
@@ -148,21 +90,16 @@ export interface SchemaDecl {
|
|
|
148
90
|
readonly naming: FieldNaming;
|
|
149
91
|
}
|
|
150
92
|
/**
|
|
151
|
-
* How this file spells its fields, resolved from the schema call's
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* got, and picking one is the guess this reader does not make. A config named
|
|
157
|
-
* by a variable, or one of two, yields `"unknown"`, which costs the snake_case
|
|
158
|
-
* fields and keeps the underscore-free ones (both dispositions agree on those).
|
|
93
|
+
* How this file spells its fields, resolved from the schema call's `config`.
|
|
94
|
+
* The tie must be syntactic: `keywordText.config` must literally read
|
|
95
|
+
* `StrawberryConfig(...)` and the file must contain exactly one such call,
|
|
96
|
+
* or nothing says which config applies and picking one would be a guess —
|
|
97
|
+
* a variable or a second call yields `"unknown"` instead.
|
|
159
98
|
*/
|
|
160
99
|
export declare function namingOf(calls: readonly PyCall[], schemaCall: PyCall): FieldNaming;
|
|
161
100
|
/**
|
|
162
|
-
* Every `strawberry.Schema(...)` this file declares.
|
|
163
|
-
*
|
|
164
|
-
* `strawberry.federation.Schema` is included: federation changes what the
|
|
165
|
-
* gateway does with a subgraph, not how the subgraph names its own operations.
|
|
101
|
+
* Every `strawberry.Schema(...)` this file declares. `strawberry.federation.
|
|
102
|
+
* Schema` is included — federation changes gateway behavior, not naming.
|
|
166
103
|
*/
|
|
167
104
|
export declare function schemaDeclsIn(file: string, calls: readonly PyCall[], moduleOf: (name: string) => string | undefined): readonly SchemaDecl[];
|
|
168
105
|
/** One field on a root operation type, as far as this reader could read it. */
|
|
@@ -174,11 +111,9 @@ export interface OperationField {
|
|
|
174
111
|
readonly line: number;
|
|
175
112
|
}
|
|
176
113
|
/**
|
|
177
|
-
* Is this class-body assignment a declared strawberry field?
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* strawberry or strawberry-django. `helper()` from an unrelated library and a
|
|
181
|
-
* plain `version = "1.0"` are class attributes, not operations.
|
|
114
|
+
* Is this class-body assignment a declared strawberry field? Provenance, not
|
|
115
|
+
* shape — the constructor's module must resolve to strawberry/-django, so
|
|
116
|
+
* `helper()` from an unrelated library or `version = "1.0"` are plain attributes.
|
|
182
117
|
*/
|
|
183
118
|
export declare function isFieldConstructor(callee: string | null, moduleOf: (name: string) => string | undefined): boolean;
|
|
184
119
|
/** The literal `name=` on a field constructor, if one was written. */
|
|
@@ -187,8 +122,7 @@ export declare function explicitNameOf(keywords: Readonly<Record<string, unknown
|
|
|
187
122
|
export declare function fieldsFromAttributes(attributes: readonly PyAttribute[], file: string, naming: FieldNaming, moduleOf: (name: string) => string | undefined): readonly OperationField[];
|
|
188
123
|
/**
|
|
189
124
|
* The same field written as a decorated method — `@strawberry.field def
|
|
190
|
-
* circuit_by_id(...)
|
|
191
|
-
* with arguments. `decoratorCalls` carries `@strawberry.field(name="x")`;
|
|
125
|
+
* circuit_by_id(...)`. `decoratorCalls` carries the parametrised form;
|
|
192
126
|
* the bare `@strawberry.field` arrives only in `decorators`, so both are read.
|
|
193
127
|
*/
|
|
194
128
|
export declare function fieldFromMethod(methodName: string, decorators: readonly (string | null)[], decoratorCalls: readonly PyCall[], file: string, line: number, naming: FieldNaming, moduleOf: (name: string) => string | undefined): OperationField | null;
|
package/dist/graphql.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,wEAAwE;AACxE,eAAO,MAAM,eAAe,gDAAiD,CAAC;AAC9E,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,iFAAiF;AACjF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAIlE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAK7C,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAAgD,CAAC;AAE/F;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAkC,CAAC;AAEtF,oEAAoE;AACpE,eAA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-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* -
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* | strawberry's own rule | consequence here |
|
|
31
|
-
* | --- | --- |
|
|
32
|
-
* | `NameConverter.auto_camel_case` defaults to **True** | `circuit_list` is served as `circuitList` |
|
|
33
|
-
* | an explicit `graphql_name` returns before `apply_naming_config` | `field(name="allCircuits")` is the name, verbatim |
|
|
34
|
-
* | `to_camel_case` is `s.split("_")`, rejoined | a name with **no** `_` is unchanged by it |
|
|
35
|
-
*
|
|
36
|
-
* So this reader admits a field **only when its schema-facing name can be read
|
|
37
|
-
* verbatim out of the source** — the three rows above give exactly three such
|
|
38
|
-
* cases, and `readFieldName` is the whole rule. Anything else is refused and
|
|
39
|
-
* disclosed. **The reader never computes a name.** Writing `circuitList` — a
|
|
40
|
-
* string that appears nowhere in the repository — because a library default
|
|
41
|
-
* says it should is precisely the DEC-055 shape both decisions exist to
|
|
42
|
-
* prevent: everything normalises, everything resolves, and the join is silently
|
|
43
|
-
* zero because the consumer half read the real wire name and this half invented
|
|
44
|
-
* a plausible one.
|
|
45
|
-
*
|
|
46
|
-
* The half that *is* still assembled is the `/Query/` prefix, and it is
|
|
47
|
-
* assembled out of the schema call's own slot keyword (`query=`/`mutation=`/
|
|
48
|
-
* `subscription=`) rather than out of any Python name. The three operation-type
|
|
49
|
-
* words are GraphQL's, fixed by the specification, and a client addresses an
|
|
50
|
-
* operation by its slot — never by the root class's name. That is why a class
|
|
51
|
-
* decorated `@strawberry.type(name="Query")` sitting in the `mutation=` slot
|
|
52
|
-
* yields `/Mutation/...` here, and why netbox's ten mixins all decorated
|
|
53
|
-
* `name="Query"` are read through the slot their root occupies rather than
|
|
54
|
-
* through a decorator that strawberry itself discards for a base class.
|
|
55
|
-
*
|
|
56
|
-
* ## The provenance rule, which does the precision work
|
|
57
|
-
*
|
|
58
|
-
* A field becomes an operation only when **a `strawberry.Schema(...)` call,
|
|
59
|
-
* whose callee resolves through the import table to strawberry's own module,
|
|
60
|
-
* puts its class in a root slot.** Not because a class is decorated
|
|
61
|
-
* `@strawberry.type` — netbox has 34 of those and 10 are root mixins — and
|
|
62
|
-
* never because an attribute is spelled like a field. This is `routes.ts`'s
|
|
63
|
-
* "the receiver must resolve to a router constructed from a web framework's own
|
|
64
|
-
* module" rule in a second spelling, and it is the same lesson: a node type
|
|
65
|
-
* comes from provenance or from nothing.
|
|
66
|
-
*
|
|
67
|
-
* The split with `extract.py` is this adapter's standing one — the Python side
|
|
68
|
-
* records syntactic form and names no framework, every decision about what a
|
|
69
|
-
* form *means* is taken here.
|
|
5
|
+
* Identity: `API_ROUTE`/`API_ENDPOINT` is `METHOD /path`, but a GraphQL field
|
|
6
|
+
* has neither. `DEC-NEXT-graphql-operation-identity` settles it by
|
|
7
|
+
* transposing the gRPC precedent (`DEC-NEXT-grpc-route-identity`): `method`
|
|
8
|
+
* is the literal sentinel `"GRAPHQL"` (not load-bearing for identity, just
|
|
9
|
+
* a hint to a reader of `attrs.method`), and path is `/<OperationType>/<field>`
|
|
10
|
+
* (`/Query/circuit`, `/Mutation/create_order`).
|
|
11
|
+
*
|
|
12
|
+
* Departure from gRPC's precedent: protoc writes the path as a literal
|
|
13
|
+
* (`Service_Method_FullMethodName`), but strawberry writes no such artifact —
|
|
14
|
+
* the schema-facing field name can differ from the Python name
|
|
15
|
+
* (`auto_camel_case` defaults true, an explicit `graphql_name` wins, a
|
|
16
|
+
* no-underscore name is unchanged either way). So a field is admitted only
|
|
17
|
+
* when its schema-facing name can be read verbatim from source
|
|
18
|
+
* (`readFieldName` is the whole rule) — never computed, since a computed
|
|
19
|
+
* `circuitList` nowhere in the repository is exactly DEC-055's silent-zero-join
|
|
20
|
+
* failure. The `/Query/` prefix IS assembled, but from the schema call's own
|
|
21
|
+
* slot keyword (`query=`/`mutation=`/`subscription=`), never the class's
|
|
22
|
+
* name — netbox decorates ten root mixins `name="Query"` but they're read by
|
|
23
|
+
* slot, since strawberry itself discards that decorator for a base class.
|
|
24
|
+
*
|
|
25
|
+
* Provenance rule: a field is an operation only when a `strawberry.Schema(...)`
|
|
26
|
+
* call resolving through the import table puts its class in a root slot —
|
|
27
|
+
* never from `@strawberry.type` alone (netbox has 34, 10 are root mixins) —
|
|
28
|
+
* mirroring `routes.ts`'s router-provenance rule. `extract.py` records
|
|
29
|
+
* syntactic form and names no framework; every "what does this form mean" decision is here.
|
|
70
30
|
*/
|
|
71
31
|
/**
|
|
72
|
-
* The protocol sentinel
|
|
73
|
-
*
|
|
74
|
-
* the operation type is carried in the path where gRPC carries the service.
|
|
32
|
+
* The protocol sentinel, per `DEC-NEXT-grpc-route-identity`'s `"RPC"` — not
|
|
33
|
+
* split by operation type, which the path already carries.
|
|
75
34
|
*/
|
|
76
35
|
export const GRAPHQL_METHOD = "GRAPHQL";
|
|
77
36
|
/** GraphQL's three root operation types, fixed by the specification. */
|
|
@@ -83,10 +42,9 @@ export const OPERATION_TYPE = {
|
|
|
83
42
|
subscription: "Subscription",
|
|
84
43
|
};
|
|
85
44
|
/**
|
|
86
|
-
* The modules a `Schema` must come from
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* for `Blueprint`.
|
|
45
|
+
* The modules a `Schema` must come from — the precision control, since a
|
|
46
|
+
* local class called `Schema` isn't strawberry's (the same trap
|
|
47
|
+
* `ROUTER_CONSTRUCTORS` guards against for `Blueprint`).
|
|
90
48
|
*/
|
|
91
49
|
export const SCHEMA_MODULES = new Set([
|
|
92
50
|
"strawberry",
|
|
@@ -97,37 +55,24 @@ export const SCHEMA_MODULES = new Set([
|
|
|
97
55
|
/** The modules a field constructor must come from, for the same reason. */
|
|
98
56
|
export const FIELD_MODULES = new Set(["strawberry", "strawberry_django"]);
|
|
99
57
|
/**
|
|
100
|
-
* The field constructors read as declaring a root operation.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* name rule. Relay's `node`/`connection` are **not** here: no repository on
|
|
107
|
-
* hand writes them, and a constructor admitted from documentation rather than
|
|
108
|
-
* from a counted repository is a case that was imagined.
|
|
58
|
+
* The field constructors read as declaring a root operation. Deliberately
|
|
59
|
+
* short: `field` covers netbox's 246 root operations (the only form with
|
|
60
|
+
* corpus evidence), `mutation` is strawberry's unambiguous mutation-slot
|
|
61
|
+
* constructor. Relay's `node`/`connection` are absent — no repository on
|
|
62
|
+
* hand writes them, and admitting from documentation rather than a counted
|
|
63
|
+
* repository is an imagined case.
|
|
109
64
|
*/
|
|
110
65
|
export const FIELD_CONSTRUCTORS = new Set(["field", "mutation"]);
|
|
111
66
|
/** The class decorator that makes a class a GraphQL type at all. */
|
|
112
67
|
export const TYPE_DECORATORS = new Set(["type", "interface", "input"]);
|
|
113
68
|
/**
|
|
114
|
-
* The schema-facing name of a field,
|
|
115
|
-
* mean computing it.
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* - `get_graphql_name` returns `obj.graphql_name` *before* `apply_naming_config`
|
|
122
|
-
* is ever called, so an explicit `name=` is the answer under every config.
|
|
123
|
-
* - with `auto_camel_case=False`, `apply_naming_config` is the identity.
|
|
124
|
-
* - `to_camel_case(s)` is `s.split("_")` rejoined, so for a name containing no
|
|
125
|
-
* `_` it is the identity too — which is why an underscore-free field is
|
|
126
|
-
* readable even when this run could not resolve the config at all.
|
|
127
|
-
*
|
|
128
|
-
* There is no fourth branch, and there must not be one: the only way to answer
|
|
129
|
-
* the remaining case is to run strawberry's transform, and the result would be
|
|
130
|
-
* a string that is not written anywhere in the repository.
|
|
69
|
+
* The schema-facing name of a field, read — or `null` when stating it would
|
|
70
|
+
* mean computing it. Every branch mirrors a line of strawberry's own
|
|
71
|
+
* `name_converter.py`: an explicit `name=` always wins (`get_graphql_name`
|
|
72
|
+
* runs before `apply_naming_config`); `auto_camel_case=False` is the
|
|
73
|
+
* identity; and an underscore-free name is unchanged by `to_camel_case`
|
|
74
|
+
* regardless. No fourth branch — answering the remaining case means running
|
|
75
|
+
* strawberry's transform and writing a string that appears nowhere in the repository.
|
|
131
76
|
*/
|
|
132
77
|
export function readFieldName(attributeName, explicitName, naming) {
|
|
133
78
|
if (explicitName !== null && explicitName !== "")
|
|
@@ -147,12 +92,10 @@ function lastSegmentOf(callee) {
|
|
|
147
92
|
return dot === -1 ? callee : callee.slice(dot + 1);
|
|
148
93
|
}
|
|
149
94
|
/**
|
|
150
|
-
* Does a written callee resolve, through the file's import table, to a
|
|
151
|
-
* in one of `modules`?
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* Schema` binds the symbol directly, and `import strawberry` binds the module,
|
|
155
|
-
* in which case the dotted prefix in the source carries the rest of the path.
|
|
95
|
+
* Does a written callee resolve, through the file's import table, to a
|
|
96
|
+
* symbol in one of `modules`? Both spellings are checked: `from strawberry
|
|
97
|
+
* import Schema` binds the symbol; `import strawberry` binds the module, so
|
|
98
|
+
* the dotted prefix carries the rest of the path.
|
|
156
99
|
*/
|
|
157
100
|
function resolvesToModule(callee, wanted, modules, moduleOf) {
|
|
158
101
|
if (!wanted.has(lastSegmentOf(callee)))
|
|
@@ -171,19 +114,15 @@ function resolvesToModule(callee, wanted, modules, moduleOf) {
|
|
|
171
114
|
return modules.has(full);
|
|
172
115
|
}
|
|
173
116
|
/**
|
|
174
|
-
* How this file spells its fields, resolved from the schema call's
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* got, and picking one is the guess this reader does not make. A config named
|
|
180
|
-
* by a variable, or one of two, yields `"unknown"`, which costs the snake_case
|
|
181
|
-
* fields and keeps the underscore-free ones (both dispositions agree on those).
|
|
117
|
+
* How this file spells its fields, resolved from the schema call's `config`.
|
|
118
|
+
* The tie must be syntactic: `keywordText.config` must literally read
|
|
119
|
+
* `StrawberryConfig(...)` and the file must contain exactly one such call,
|
|
120
|
+
* or nothing says which config applies and picking one would be a guess —
|
|
121
|
+
* a variable or a second call yields `"unknown"` instead.
|
|
182
122
|
*/
|
|
183
123
|
export function namingOf(calls, schemaCall) {
|
|
184
124
|
const written = schemaCall.keywordText["config"];
|
|
185
|
-
// No config keyword
|
|
186
|
-
// `NameConverter.__init__` — `auto_camel_case` is True.
|
|
125
|
+
// No config keyword: strawberry's default, `NameConverter.__init__`'s `auto_camel_case = True`.
|
|
187
126
|
if (written === undefined)
|
|
188
127
|
return "camel";
|
|
189
128
|
if (!/^\s*(?:[A-Za-z_][\w.]*\.)?StrawberryConfig\s*\(/.test(written))
|
|
@@ -196,15 +135,12 @@ export function namingOf(calls, schemaCall) {
|
|
|
196
135
|
return "camel";
|
|
197
136
|
if (value === false)
|
|
198
137
|
return "verbatim";
|
|
199
|
-
// Written
|
|
200
|
-
// constructor default applies and that default is camel-casing.
|
|
138
|
+
// Written non-literally is unknown; unwritten falls to the camel-casing default.
|
|
201
139
|
return configs[0].opaqueKeywords.includes("auto_camel_case") ? "unknown" : "camel";
|
|
202
140
|
}
|
|
203
141
|
/**
|
|
204
|
-
* Every `strawberry.Schema(...)` this file declares.
|
|
205
|
-
*
|
|
206
|
-
* `strawberry.federation.Schema` is included: federation changes what the
|
|
207
|
-
* gateway does with a subgraph, not how the subgraph names its own operations.
|
|
142
|
+
* Every `strawberry.Schema(...)` this file declares. `strawberry.federation.
|
|
143
|
+
* Schema` is included — federation changes gateway behavior, not naming.
|
|
208
144
|
*/
|
|
209
145
|
export function schemaDeclsIn(file, calls, moduleOf) {
|
|
210
146
|
const found = [];
|
|
@@ -222,9 +158,8 @@ export function schemaDeclsIn(file, calls, moduleOf) {
|
|
|
222
158
|
continue;
|
|
223
159
|
}
|
|
224
160
|
const written = call.keywordText[slot];
|
|
225
|
-
// A
|
|
226
|
-
//
|
|
227
|
-
// the exact thing a ledger row is for.
|
|
161
|
+
// A call/subscript/attribute slot names a root this reader can't
|
|
162
|
+
// follow; the operations under it are real and unreadable.
|
|
228
163
|
if (written !== undefined)
|
|
229
164
|
opaqueSlots.push({ slot, written });
|
|
230
165
|
}
|
|
@@ -235,11 +170,9 @@ export function schemaDeclsIn(file, calls, moduleOf) {
|
|
|
235
170
|
return found;
|
|
236
171
|
}
|
|
237
172
|
/**
|
|
238
|
-
* Is this class-body assignment a declared strawberry field?
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* strawberry or strawberry-django. `helper()` from an unrelated library and a
|
|
242
|
-
* plain `version = "1.0"` are class attributes, not operations.
|
|
173
|
+
* Is this class-body assignment a declared strawberry field? Provenance, not
|
|
174
|
+
* shape — the constructor's module must resolve to strawberry/-django, so
|
|
175
|
+
* `helper()` from an unrelated library or `version = "1.0"` are plain attributes.
|
|
243
176
|
*/
|
|
244
177
|
export function isFieldConstructor(callee, moduleOf) {
|
|
245
178
|
if (callee === null)
|
|
@@ -269,8 +202,7 @@ export function fieldsFromAttributes(attributes, file, naming, moduleOf) {
|
|
|
269
202
|
}
|
|
270
203
|
/**
|
|
271
204
|
* The same field written as a decorated method — `@strawberry.field def
|
|
272
|
-
* circuit_by_id(...)
|
|
273
|
-
* with arguments. `decoratorCalls` carries `@strawberry.field(name="x")`;
|
|
205
|
+
* circuit_by_id(...)`. `decoratorCalls` carries the parametrised form;
|
|
274
206
|
* the bare `@strawberry.field` arrives only in `decorators`, so both are read.
|
|
275
207
|
*/
|
|
276
208
|
export function fieldFromMethod(methodName, decorators, decoratorCalls, file, line, naming, moduleOf) {
|
package/dist/graphql.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot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