@gqlbase/plugins 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/ModelPlugin/ModelPlugin.d.ts +97 -0
- package/dist/base/ModelPlugin/ModelPlugin.d.ts.map +1 -0
- package/dist/base/ModelPlugin/ModelPlugin.js +405 -0
- package/dist/base/ModelPlugin/ModelPlugin.js.map +1 -0
- package/dist/base/ModelPlugin/ModelPlugin.utils.d.ts +31 -0
- package/dist/base/ModelPlugin/ModelPlugin.utils.d.ts.map +1 -0
- package/dist/base/ModelPlugin/ModelPlugin.utils.js +57 -0
- package/dist/base/ModelPlugin/ModelPlugin.utils.js.map +1 -0
- package/dist/base/ModelPlugin/index.d.ts +3 -0
- package/dist/base/ModelPlugin/index.d.ts.map +1 -0
- package/dist/base/ModelPlugin/index.js +3 -0
- package/dist/base/ModelPlugin/index.js.map +1 -0
- package/dist/base/ModelTypesGeneratorPlugin/ModelTypesGeneratorPlugin.d.ts +23 -0
- package/dist/base/ModelTypesGeneratorPlugin/ModelTypesGeneratorPlugin.d.ts.map +1 -0
- package/dist/base/ModelTypesGeneratorPlugin/ModelTypesGeneratorPlugin.js +161 -0
- package/dist/base/ModelTypesGeneratorPlugin/ModelTypesGeneratorPlugin.js.map +1 -0
- package/dist/base/ModelTypesGeneratorPlugin/ModelTypesGeneratorPlugin.utils.d.ts +12 -0
- package/dist/base/ModelTypesGeneratorPlugin/ModelTypesGeneratorPlugin.utils.d.ts.map +1 -0
- package/dist/base/ModelTypesGeneratorPlugin/ModelTypesGeneratorPlugin.utils.js +30 -0
- package/dist/base/ModelTypesGeneratorPlugin/ModelTypesGeneratorPlugin.utils.js.map +1 -0
- package/dist/base/ModelTypesGeneratorPlugin/index.d.ts +2 -0
- package/dist/base/ModelTypesGeneratorPlugin/index.d.ts.map +1 -0
- package/dist/base/ModelTypesGeneratorPlugin/index.js +2 -0
- package/dist/base/ModelTypesGeneratorPlugin/index.js.map +1 -0
- package/dist/base/RelationsPlugin/RelationsPlugin.d.ts +60 -0
- package/dist/base/RelationsPlugin/RelationsPlugin.d.ts.map +1 -0
- package/dist/base/RelationsPlugin/RelationsPlugin.js +188 -0
- package/dist/base/RelationsPlugin/RelationsPlugin.js.map +1 -0
- package/dist/base/RelationsPlugin/RelationsPlugin.utils.d.ts +19 -0
- package/dist/base/RelationsPlugin/RelationsPlugin.utils.d.ts.map +1 -0
- package/dist/base/RelationsPlugin/RelationsPlugin.utils.js +30 -0
- package/dist/base/RelationsPlugin/RelationsPlugin.utils.js.map +1 -0
- package/dist/base/RelationsPlugin/index.d.ts +3 -0
- package/dist/base/RelationsPlugin/index.d.ts.map +1 -0
- package/dist/base/RelationsPlugin/index.js +3 -0
- package/dist/base/RelationsPlugin/index.js.map +1 -0
- package/dist/base/ScalarsPlugin/ScalarsPlugin.d.ts +56 -0
- package/dist/base/ScalarsPlugin/ScalarsPlugin.d.ts.map +1 -0
- package/dist/base/ScalarsPlugin/ScalarsPlugin.js +140 -0
- package/dist/base/ScalarsPlugin/ScalarsPlugin.js.map +1 -0
- package/dist/base/ScalarsPlugin/index.d.ts +2 -0
- package/dist/base/ScalarsPlugin/index.d.ts.map +1 -0
- package/dist/base/ScalarsPlugin/index.js +2 -0
- package/dist/base/ScalarsPlugin/index.js.map +1 -0
- package/dist/base/SchemaGeneratorPlugin.d.ts +7 -0
- package/dist/base/SchemaGeneratorPlugin.d.ts.map +1 -0
- package/dist/base/SchemaGeneratorPlugin.js +14 -0
- package/dist/base/SchemaGeneratorPlugin.js.map +1 -0
- package/dist/base/UtilitiesPlugin/UtilitiesPlugin.d.ts +17 -0
- package/dist/base/UtilitiesPlugin/UtilitiesPlugin.d.ts.map +1 -0
- package/dist/base/UtilitiesPlugin/UtilitiesPlugin.js +66 -0
- package/dist/base/UtilitiesPlugin/UtilitiesPlugin.js.map +1 -0
- package/dist/base/UtilitiesPlugin/UtilitiesPlugin.utils.d.ts +25 -0
- package/dist/base/UtilitiesPlugin/UtilitiesPlugin.utils.d.ts.map +1 -0
- package/dist/base/UtilitiesPlugin/UtilitiesPlugin.utils.js +38 -0
- package/dist/base/UtilitiesPlugin/UtilitiesPlugin.utils.js.map +1 -0
- package/dist/base/UtilitiesPlugin/index.d.ts +3 -0
- package/dist/base/UtilitiesPlugin/index.d.ts.map +1 -0
- package/dist/base/UtilitiesPlugin/index.js +3 -0
- package/dist/base/UtilitiesPlugin/index.js.map +1 -0
- package/dist/base/basePreset.d.ts +15 -0
- package/dist/base/basePreset.d.ts.map +1 -0
- package/dist/base/basePreset.js +30 -0
- package/dist/base/basePreset.js.map +1 -0
- package/dist/base/index.d.ts +6 -2
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.js +7 -2
- package/dist/base/index.js.map +1 -0
- package/dist/relay/ConnectionPlugin.d.ts +46 -0
- package/dist/relay/ConnectionPlugin.d.ts.map +1 -0
- package/dist/relay/ConnectionPlugin.js +200 -0
- package/dist/relay/ConnectionPlugin.js.map +1 -0
- package/dist/{base → relay}/NodeInterfacePlugin.d.ts +1 -0
- package/dist/relay/NodeInterfacePlugin.d.ts.map +1 -0
- package/dist/{base → relay}/NodeInterfacePlugin.js +20 -6
- package/dist/relay/NodeInterfacePlugin.js.map +1 -0
- package/dist/relay/index.d.ts +3 -0
- package/dist/relay/index.d.ts.map +1 -0
- package/dist/relay/index.js +3 -0
- package/dist/relay/index.js.map +1 -0
- package/dist/relay/relayPreset.d.ts +11 -0
- package/dist/relay/relayPreset.d.ts.map +1 -0
- package/dist/relay/relayPreset.js +15 -0
- package/dist/relay/relayPreset.js.map +1 -0
- package/package.json +3 -3
- package/dist/base/ModelPlugin.d.ts +0 -59
- package/dist/base/ModelPlugin.d.ts.map +0 -1
- package/dist/base/ModelPlugin.js +0 -222
- package/dist/base/NodeInterfacePlugin.d.ts.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ITransformerContext } from "@gqlbase/core/context";
|
|
2
|
+
import { TransformerPluginBase } from "@gqlbase/core/plugins";
|
|
3
|
+
/**
|
|
4
|
+
* Adds support for custom, commonly used scalars.
|
|
5
|
+
*
|
|
6
|
+
* The implementation of these scalars is left to the user, but they help provide a common interface for platforms that implement custom scalars.
|
|
7
|
+
*
|
|
8
|
+
* Scalars:
|
|
9
|
+
*
|
|
10
|
+
* - `DateTime`: ISO-8601 formatted date-time string.
|
|
11
|
+
* Specified by: http://www.ietf.org/rfc/rfc3339.txt
|
|
12
|
+
* Example: `"2023-01-01T12:34:56Z"`, `"1999-12-31T23:59:59+00:00"`
|
|
13
|
+
*
|
|
14
|
+
* - `Date`: ISO-8601 formatted date string (YYYY-MM-DD).
|
|
15
|
+
* Specified by: http://www.ietf.org/rfc/rfc3339.txt
|
|
16
|
+
* Example: `"2023-01-01"`, `"1999-12-31"`
|
|
17
|
+
*
|
|
18
|
+
* - `Time`: ISO-8601 formatted time string (hh:mm:ss).
|
|
19
|
+
* Specified by: http://www.ietf.org/rfc/rfc3339.txt
|
|
20
|
+
* Example: `"12:34:56"`, `"23:59"`, `"00:00"`
|
|
21
|
+
*
|
|
22
|
+
* - `Timestamp`: Unix timestamp (number of seconds since January 1, 1970).
|
|
23
|
+
* Specified by: https://en.wikipedia.org/wiki/Unix_time
|
|
24
|
+
* Example: `1627846261`, `-1234567890`
|
|
25
|
+
*
|
|
26
|
+
* - `URL`: A valid URL string.
|
|
27
|
+
* Specified by: https://www.ietf.org/rfc/rfc3986.txt
|
|
28
|
+
* Example: `"https://www.example.com"`, `"ftp://ftp.example.com/resource.txt"`
|
|
29
|
+
*
|
|
30
|
+
* - `EmailAddress`: A valid email address string.
|
|
31
|
+
* Specified by: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
|
|
32
|
+
* Example: `"
|
|
33
|
+
*
|
|
34
|
+
* - `PhoneNumber`: A valid phone number string.
|
|
35
|
+
* Specified by: https://www.itu.int/rec/T-REC-E.164
|
|
36
|
+
* Example: `"+1-202-555-0123"`, `"+44 20 7946 0958"`
|
|
37
|
+
*
|
|
38
|
+
* - `IPAddress`: A valid IPv4 or IPv6 address string.
|
|
39
|
+
* Specified by: https://www.ietf.org/rfc/rfc3986.txt
|
|
40
|
+
* Example: `"
|
|
41
|
+
*
|
|
42
|
+
* - `JSON`: Arbitrary JSON value.
|
|
43
|
+
* Specified by: https://json.org/
|
|
44
|
+
* Example: `{"key": "value", "array": [1, 2, 3], "nested": {"foo": "bar"}}`
|
|
45
|
+
*
|
|
46
|
+
* - `UUID`: A valid UUID v4 string.
|
|
47
|
+
* Specified by: http://rfc-editor.org/rfc/rfc9562
|
|
48
|
+
* Example: `"550e8400-e29b-41d4-a716-446655440000"`, `"123e4567-e89b-12d3-a456-426614174000"`
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export declare class ScalarsPlugin extends TransformerPluginBase {
|
|
52
|
+
constructor(context: ITransformerContext);
|
|
53
|
+
init(): void;
|
|
54
|
+
}
|
|
55
|
+
export declare const scalarsPlugin: (options?: unknown) => import("@gqlbase/core/plugins").IPluginFactory;
|
|
56
|
+
//# sourceMappingURL=ScalarsPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarsPlugin.d.ts","sourceRoot":"","sources":["../../../src/base/ScalarsPlugin/ScalarsPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAuB,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,qBAAa,aAAc,SAAQ,qBAAqB;gBAC1C,OAAO,EAAE,mBAAmB;IAIjC,IAAI;CA4GZ;AAED,eAAO,MAAM,aAAa,uEAAqC,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { ArgumentNode, DirectiveNode, ScalarNode, ValueNode } from "@gqlbase/core/definition";
|
|
2
|
+
import { createPluginFactory, TransformerPluginBase } from "@gqlbase/core/plugins";
|
|
3
|
+
/**
|
|
4
|
+
* Adds support for custom, commonly used scalars.
|
|
5
|
+
*
|
|
6
|
+
* The implementation of these scalars is left to the user, but they help provide a common interface for platforms that implement custom scalars.
|
|
7
|
+
*
|
|
8
|
+
* Scalars:
|
|
9
|
+
*
|
|
10
|
+
* - `DateTime`: ISO-8601 formatted date-time string.
|
|
11
|
+
* Specified by: http://www.ietf.org/rfc/rfc3339.txt
|
|
12
|
+
* Example: `"2023-01-01T12:34:56Z"`, `"1999-12-31T23:59:59+00:00"`
|
|
13
|
+
*
|
|
14
|
+
* - `Date`: ISO-8601 formatted date string (YYYY-MM-DD).
|
|
15
|
+
* Specified by: http://www.ietf.org/rfc/rfc3339.txt
|
|
16
|
+
* Example: `"2023-01-01"`, `"1999-12-31"`
|
|
17
|
+
*
|
|
18
|
+
* - `Time`: ISO-8601 formatted time string (hh:mm:ss).
|
|
19
|
+
* Specified by: http://www.ietf.org/rfc/rfc3339.txt
|
|
20
|
+
* Example: `"12:34:56"`, `"23:59"`, `"00:00"`
|
|
21
|
+
*
|
|
22
|
+
* - `Timestamp`: Unix timestamp (number of seconds since January 1, 1970).
|
|
23
|
+
* Specified by: https://en.wikipedia.org/wiki/Unix_time
|
|
24
|
+
* Example: `1627846261`, `-1234567890`
|
|
25
|
+
*
|
|
26
|
+
* - `URL`: A valid URL string.
|
|
27
|
+
* Specified by: https://www.ietf.org/rfc/rfc3986.txt
|
|
28
|
+
* Example: `"https://www.example.com"`, `"ftp://ftp.example.com/resource.txt"`
|
|
29
|
+
*
|
|
30
|
+
* - `EmailAddress`: A valid email address string.
|
|
31
|
+
* Specified by: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
|
|
32
|
+
* Example: `"
|
|
33
|
+
*
|
|
34
|
+
* - `PhoneNumber`: A valid phone number string.
|
|
35
|
+
* Specified by: https://www.itu.int/rec/T-REC-E.164
|
|
36
|
+
* Example: `"+1-202-555-0123"`, `"+44 20 7946 0958"`
|
|
37
|
+
*
|
|
38
|
+
* - `IPAddress`: A valid IPv4 or IPv6 address string.
|
|
39
|
+
* Specified by: https://www.ietf.org/rfc/rfc3986.txt
|
|
40
|
+
* Example: `"
|
|
41
|
+
*
|
|
42
|
+
* - `JSON`: Arbitrary JSON value.
|
|
43
|
+
* Specified by: https://json.org/
|
|
44
|
+
* Example: `{"key": "value", "array": [1, 2, 3], "nested": {"foo": "bar"}}`
|
|
45
|
+
*
|
|
46
|
+
* - `UUID`: A valid UUID v4 string.
|
|
47
|
+
* Specified by: http://rfc-editor.org/rfc/rfc9562
|
|
48
|
+
* Example: `"550e8400-e29b-41d4-a716-446655440000"`, `"123e4567-e89b-12d3-a456-426614174000"`
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export class ScalarsPlugin extends TransformerPluginBase {
|
|
52
|
+
constructor(context) {
|
|
53
|
+
super("ScalarsPlugin", context);
|
|
54
|
+
}
|
|
55
|
+
init() {
|
|
56
|
+
this.context.base
|
|
57
|
+
.addNode(ScalarNode.create("DateTime", [
|
|
58
|
+
DirectiveNode.create("specifiedBy", [
|
|
59
|
+
ArgumentNode.create("url", ValueNode.string("http://www.ietf.org/rfc/rfc3339.txt")),
|
|
60
|
+
]),
|
|
61
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
62
|
+
ArgumentNode.create("type", ValueNode.enum("string")),
|
|
63
|
+
]),
|
|
64
|
+
]))
|
|
65
|
+
.addNode(ScalarNode.create("Date", [
|
|
66
|
+
DirectiveNode.create("specifiedBy", [
|
|
67
|
+
ArgumentNode.create("url", ValueNode.string("http://www.ietf.org/rfc/rfc3339.txt")),
|
|
68
|
+
]),
|
|
69
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
70
|
+
ArgumentNode.create("type", ValueNode.enum("string")),
|
|
71
|
+
]),
|
|
72
|
+
]))
|
|
73
|
+
.addNode(ScalarNode.create("Time", [
|
|
74
|
+
DirectiveNode.create("specifiedBy", [
|
|
75
|
+
ArgumentNode.create("url", ValueNode.string("http://www.ietf.org/rfc/rfc3339.txt")),
|
|
76
|
+
]),
|
|
77
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
78
|
+
ArgumentNode.create("type", ValueNode.enum("string")),
|
|
79
|
+
]),
|
|
80
|
+
]))
|
|
81
|
+
.addNode(ScalarNode.create("Timestamp", [
|
|
82
|
+
DirectiveNode.create("specifiedBy", [
|
|
83
|
+
ArgumentNode.create("url", ValueNode.string("https://en.wikipedia.org/wiki/Unix_time")),
|
|
84
|
+
]),
|
|
85
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
86
|
+
ArgumentNode.create("type", ValueNode.enum("number")),
|
|
87
|
+
]),
|
|
88
|
+
]))
|
|
89
|
+
.addNode(ScalarNode.create("UUID", [
|
|
90
|
+
DirectiveNode.create("specifiedBy", [
|
|
91
|
+
ArgumentNode.create("url", ValueNode.string("http://rfc-editor.org/rfc/rfc9562")),
|
|
92
|
+
]),
|
|
93
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
94
|
+
ArgumentNode.create("type", ValueNode.enum("id")),
|
|
95
|
+
]),
|
|
96
|
+
]))
|
|
97
|
+
.addNode(ScalarNode.create("URL", [
|
|
98
|
+
DirectiveNode.create("specifiedBy", [
|
|
99
|
+
ArgumentNode.create("url", ValueNode.string("https://www.ietf.org/rfc/rfc3986.txt")),
|
|
100
|
+
]),
|
|
101
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
102
|
+
ArgumentNode.create("type", ValueNode.enum("string")),
|
|
103
|
+
]),
|
|
104
|
+
]))
|
|
105
|
+
.addNode(ScalarNode.create("EmailAddress", [
|
|
106
|
+
DirectiveNode.create("specifiedBy", [
|
|
107
|
+
ArgumentNode.create("url", ValueNode.string("https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address")),
|
|
108
|
+
]),
|
|
109
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
110
|
+
ArgumentNode.create("type", ValueNode.enum("string")),
|
|
111
|
+
]),
|
|
112
|
+
]))
|
|
113
|
+
.addNode(ScalarNode.create("PhoneNumber", [
|
|
114
|
+
DirectiveNode.create("specifiedBy", [
|
|
115
|
+
ArgumentNode.create("url", ValueNode.string("https://www.itu.int/rec/T-REC-E.164")),
|
|
116
|
+
]),
|
|
117
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
118
|
+
ArgumentNode.create("type", ValueNode.enum("string")),
|
|
119
|
+
]),
|
|
120
|
+
]))
|
|
121
|
+
.addNode(ScalarNode.create("IPAddress", [
|
|
122
|
+
DirectiveNode.create("specifiedBy", [
|
|
123
|
+
ArgumentNode.create("url", ValueNode.string("https://www.ietf.org/rfc/rfc3986.txt")),
|
|
124
|
+
]),
|
|
125
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
126
|
+
ArgumentNode.create("type", ValueNode.enum("string")),
|
|
127
|
+
]),
|
|
128
|
+
]))
|
|
129
|
+
.addNode(ScalarNode.create("JSON", [
|
|
130
|
+
DirectiveNode.create("specifiedBy", [
|
|
131
|
+
ArgumentNode.create("url", ValueNode.string("https://json.org/")),
|
|
132
|
+
]),
|
|
133
|
+
DirectiveNode.create("gqlbase_typehint", [
|
|
134
|
+
ArgumentNode.create("type", ValueNode.enum("object")),
|
|
135
|
+
]),
|
|
136
|
+
]));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export const scalarsPlugin = createPluginFactory(ScalarsPlugin);
|
|
140
|
+
//# sourceMappingURL=ScalarsPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarsPlugin.js","sourceRoot":"","sources":["../../../src/base/ScalarsPlugin/ScalarsPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnF;;;;;;;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AC,CAAC;aACtD,CAAC;SACH,CAAC,CACH,CAAC;IACN,CAAC;CACF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/ScalarsPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/ScalarsPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ITransformerContext, TransformerPluginBase } from "@gqlbase/core";
|
|
2
|
+
export declare class SchemaGeneratorPlugin extends TransformerPluginBase {
|
|
3
|
+
constructor(context: ITransformerContext);
|
|
4
|
+
output(): {};
|
|
5
|
+
}
|
|
6
|
+
export declare const schemaGeneratorPlugin: (options?: unknown) => import("@gqlbase/core").IPluginFactory;
|
|
7
|
+
//# sourceMappingURL=SchemaGeneratorPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaGeneratorPlugin.d.ts","sourceRoot":"","sources":["../../src/base/SchemaGeneratorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGhG,qBAAa,qBAAsB,SAAQ,qBAAqB;gBAClD,OAAO,EAAE,mBAAmB;IAIjC,MAAM;CAMd;AAED,eAAO,MAAM,qBAAqB,+DAA6C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createPluginFactory, TransformerPluginBase } from "@gqlbase/core";
|
|
2
|
+
import { writeOutputFile } from "@gqlbase/shared/files";
|
|
3
|
+
export class SchemaGeneratorPlugin extends TransformerPluginBase {
|
|
4
|
+
constructor(context) {
|
|
5
|
+
super("SchemaGeneratorPlugin", context);
|
|
6
|
+
}
|
|
7
|
+
output() {
|
|
8
|
+
const schema = this.context.document.print();
|
|
9
|
+
writeOutputFile(this.context.outputDirectory, "schema.graphql", schema);
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export const schemaGeneratorPlugin = createPluginFactory(SchemaGeneratorPlugin);
|
|
14
|
+
//# sourceMappingURL=SchemaGeneratorPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaGeneratorPlugin.js","sourceRoot":"","sources":["../../src/base/SchemaGeneratorPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAuB,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,OAAO,qBAAsB,SAAQ,qBAAqB;IAC9D,YAAY,OAA4B;QACtC,KAAK,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAEM,MAAM;QACX,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC7C,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QAExE,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ITransformerContext } from "@gqlbase/core/context";
|
|
2
|
+
import { ITransformerPlugin } from "@gqlbase/core/plugins";
|
|
3
|
+
import { DefinitionNode, InterfaceNode, ObjectNode } from "@gqlbase/core/definition";
|
|
4
|
+
/**
|
|
5
|
+
* Adds utility directives to the schema that can be used to mark fields as server-only, client-only, read-only, write-only, filter-only, create-only, or update-only.
|
|
6
|
+
*/
|
|
7
|
+
export declare class UtilitiesPlugin implements ITransformerPlugin {
|
|
8
|
+
readonly name = "UtilitiesPlugin";
|
|
9
|
+
readonly context: ITransformerContext;
|
|
10
|
+
constructor(context: ITransformerContext);
|
|
11
|
+
init(): void;
|
|
12
|
+
match(definition: DefinitionNode): boolean;
|
|
13
|
+
cleanup(definition: ObjectNode | InterfaceNode): void;
|
|
14
|
+
after(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare const utilsPlugin: (options?: unknown) => import("@gqlbase/core/plugins").IPluginFactory;
|
|
17
|
+
//# sourceMappingURL=UtilitiesPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UtilitiesPlugin.d.ts","sourceRoot":"","sources":["../../../src/base/UtilitiesPlugin/UtilitiesPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAuB,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EACL,cAAc,EAEd,aAAa,EACb,UAAU,EACX,MAAM,0BAA0B,CAAC;AAGlC;;GAEG;AAEH,qBAAa,eAAgB,YAAW,kBAAkB;IACxD,SAAgB,IAAI,qBAAqB;IACzC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;gBAE1B,OAAO,EAAE,mBAAmB;IAIjC,IAAI,IAAI,IAAI;IAWZ,KAAK,CAAC,UAAU,EAAE,cAAc;IAQhC,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,aAAa,GAAG,IAAI;IAgCrD,KAAK,IAAI,IAAI;CAUrB;AAED,eAAO,MAAM,WAAW,uEAAuC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createPluginFactory } from "@gqlbase/core/plugins";
|
|
2
|
+
import { DirectiveDefinitionNode, InterfaceNode, ObjectNode, } from "@gqlbase/core/definition";
|
|
3
|
+
import { UtilityDirective } from "./UtilitiesPlugin.utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* Adds utility directives to the schema that can be used to mark fields as server-only, client-only, read-only, write-only, filter-only, create-only, or update-only.
|
|
6
|
+
*/
|
|
7
|
+
export class UtilitiesPlugin {
|
|
8
|
+
name = "UtilitiesPlugin";
|
|
9
|
+
context;
|
|
10
|
+
constructor(context) {
|
|
11
|
+
this.context = context;
|
|
12
|
+
}
|
|
13
|
+
init() {
|
|
14
|
+
this.context.base
|
|
15
|
+
.addNode(DirectiveDefinitionNode.create(UtilityDirective.READ_ONLY, ["FIELD_DEFINITION"]))
|
|
16
|
+
.addNode(DirectiveDefinitionNode.create(UtilityDirective.WRITE_ONLY, ["FIELD_DEFINITION"]))
|
|
17
|
+
.addNode(DirectiveDefinitionNode.create(UtilityDirective.SERVER_ONLY, ["FIELD_DEFINITION"]))
|
|
18
|
+
.addNode(DirectiveDefinitionNode.create(UtilityDirective.CLIENT_ONLY, ["FIELD_DEFINITION"]))
|
|
19
|
+
.addNode(DirectiveDefinitionNode.create(UtilityDirective.FILTER_ONLY, ["FIELD_DEFINITION"]))
|
|
20
|
+
.addNode(DirectiveDefinitionNode.create(UtilityDirective.CREATE_ONLY, ["FIELD_DEFINITION"]))
|
|
21
|
+
.addNode(DirectiveDefinitionNode.create(UtilityDirective.UPDATE_ONLY, ["FIELD_DEFINITION"]));
|
|
22
|
+
}
|
|
23
|
+
match(definition) {
|
|
24
|
+
if (definition instanceof ObjectNode || definition instanceof InterfaceNode) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
cleanup(definition) {
|
|
30
|
+
for (const field of definition.fields ?? []) {
|
|
31
|
+
if (field.hasDirective(UtilityDirective.READ_ONLY)) {
|
|
32
|
+
field.removeDirective(UtilityDirective.READ_ONLY);
|
|
33
|
+
}
|
|
34
|
+
if (field.hasDirective(UtilityDirective.CLIENT_ONLY)) {
|
|
35
|
+
field.removeDirective(UtilityDirective.CLIENT_ONLY);
|
|
36
|
+
}
|
|
37
|
+
if (field.hasDirective(UtilityDirective.FILTER_ONLY)) {
|
|
38
|
+
definition.removeField(field.name);
|
|
39
|
+
}
|
|
40
|
+
if (field.hasDirective(UtilityDirective.CREATE_ONLY)) {
|
|
41
|
+
definition.removeField(field.name);
|
|
42
|
+
}
|
|
43
|
+
if (field.hasDirective(UtilityDirective.UPDATE_ONLY)) {
|
|
44
|
+
definition.removeField(field.name);
|
|
45
|
+
}
|
|
46
|
+
if (field.hasDirective(UtilityDirective.WRITE_ONLY)) {
|
|
47
|
+
definition.removeField(field.name);
|
|
48
|
+
}
|
|
49
|
+
if (field.hasDirective(UtilityDirective.SERVER_ONLY)) {
|
|
50
|
+
definition.removeField(field.name);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
after() {
|
|
55
|
+
this.context.document
|
|
56
|
+
.removeNode(UtilityDirective.READ_ONLY)
|
|
57
|
+
.removeNode(UtilityDirective.WRITE_ONLY)
|
|
58
|
+
.removeNode(UtilityDirective.SERVER_ONLY)
|
|
59
|
+
.removeNode(UtilityDirective.CLIENT_ONLY)
|
|
60
|
+
.removeNode(UtilityDirective.FILTER_ONLY)
|
|
61
|
+
.removeNode(UtilityDirective.CREATE_ONLY)
|
|
62
|
+
.removeNode(UtilityDirective.UPDATE_ONLY);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export const utilsPlugin = createPluginFactory(UtilitiesPlugin);
|
|
66
|
+
//# sourceMappingURL=UtilitiesPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UtilitiesPlugin.js","sourceRoot":"","sources":["../../../src/base/UtilitiesPlugin/UtilitiesPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAEL,uBAAuB,EACvB,aAAa,EAC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CAAC,gBAAgB,CAAC,UAAU,CAAC;aACvC,UAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC;aACxC,UAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC;aACxC,UAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC;aACxC,UAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC;aACxC,UAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;CACF;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FieldNode } from "@gqlbase/core/definition";
|
|
2
|
+
export declare const UtilityDirective: {
|
|
3
|
+
/** @serverOnly Marks a field as server-only, meaning it should only be resolved on the server and not exposed to the client. The field will be removed from the final schema */
|
|
4
|
+
readonly SERVER_ONLY: "serverOnly";
|
|
5
|
+
/** @clientOnly Marks a field as client-only, meaning it will be resolved at runtime. This field does not get added to inputs. */
|
|
6
|
+
readonly CLIENT_ONLY: "clientOnly";
|
|
7
|
+
/** @readOnly Marks a field as read-only, meaning it will be included in the schema but cannot be modified by the user. This field does not get added to inputs. */
|
|
8
|
+
readonly READ_ONLY: "readOnly";
|
|
9
|
+
/** @writeOnly Marks a field as write-only, meaning it will only be available in inputs. */
|
|
10
|
+
readonly WRITE_ONLY: "writeOnly";
|
|
11
|
+
/** @filterOnly Marks a field as filter-only, meaning it will only be available in the filter input */
|
|
12
|
+
readonly FILTER_ONLY: "filterOnly";
|
|
13
|
+
/** @createOnly Marks a field as create-only, meaning it will only be available in the create input */
|
|
14
|
+
readonly CREATE_ONLY: "createOnly";
|
|
15
|
+
/** @updateOnly Marks a field as update-only, meaning it will only be available in the update input */
|
|
16
|
+
readonly UPDATE_ONLY: "updateOnly";
|
|
17
|
+
};
|
|
18
|
+
export declare const isReadOnly: (node: FieldNode) => boolean;
|
|
19
|
+
export declare const isWriteOnly: (node: FieldNode) => boolean;
|
|
20
|
+
export declare const isServerOnly: (node: FieldNode) => boolean;
|
|
21
|
+
export declare const isClientOnly: (node: FieldNode) => boolean;
|
|
22
|
+
export declare const isFilterOnly: (node: FieldNode) => boolean;
|
|
23
|
+
export declare const isCreateOnly: (node: FieldNode) => boolean;
|
|
24
|
+
export declare const isUpdateOnly: (node: FieldNode) => boolean;
|
|
25
|
+
//# sourceMappingURL=UtilitiesPlugin.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UtilitiesPlugin.utils.d.ts","sourceRoot":"","sources":["../../../src/base/UtilitiesPlugin/UtilitiesPlugin.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,eAAO,MAAM,gBAAgB;IAC3B,gLAAgL;;IAGhL,iIAAiI;;IAGjI,mKAAmK;;IAGnK,2FAA2F;;IAG3F,sGAAsG;;IAGtG,sGAAsG;;IAGtG,sGAAsG;;CAE9F,CAAC;AAEX,eAAO,MAAM,UAAU,GAAI,MAAM,SAAS,KAAG,OAE5C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,SAAS,KAAG,OAE7C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,SAAS,KAAG,OAE9C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,SAAS,KAAG,OAE9C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,SAAS,KAAG,OAE9C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,SAAS,KAAG,OAE9C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,SAAS,KAAG,OAE9C,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const UtilityDirective = {
|
|
2
|
+
/** @serverOnly Marks a field as server-only, meaning it should only be resolved on the server and not exposed to the client. The field will be removed from the final schema */
|
|
3
|
+
SERVER_ONLY: "serverOnly",
|
|
4
|
+
/** @clientOnly Marks a field as client-only, meaning it will be resolved at runtime. This field does not get added to inputs. */
|
|
5
|
+
CLIENT_ONLY: "clientOnly",
|
|
6
|
+
/** @readOnly Marks a field as read-only, meaning it will be included in the schema but cannot be modified by the user. This field does not get added to inputs. */
|
|
7
|
+
READ_ONLY: "readOnly",
|
|
8
|
+
/** @writeOnly Marks a field as write-only, meaning it will only be available in inputs. */
|
|
9
|
+
WRITE_ONLY: "writeOnly",
|
|
10
|
+
/** @filterOnly Marks a field as filter-only, meaning it will only be available in the filter input */
|
|
11
|
+
FILTER_ONLY: "filterOnly",
|
|
12
|
+
/** @createOnly Marks a field as create-only, meaning it will only be available in the create input */
|
|
13
|
+
CREATE_ONLY: "createOnly",
|
|
14
|
+
/** @updateOnly Marks a field as update-only, meaning it will only be available in the update input */
|
|
15
|
+
UPDATE_ONLY: "updateOnly",
|
|
16
|
+
};
|
|
17
|
+
export const isReadOnly = (node) => {
|
|
18
|
+
return node.hasDirective(UtilityDirective.READ_ONLY);
|
|
19
|
+
};
|
|
20
|
+
export const isWriteOnly = (node) => {
|
|
21
|
+
return node.hasDirective(UtilityDirective.WRITE_ONLY);
|
|
22
|
+
};
|
|
23
|
+
export const isServerOnly = (node) => {
|
|
24
|
+
return node.hasDirective(UtilityDirective.SERVER_ONLY);
|
|
25
|
+
};
|
|
26
|
+
export const isClientOnly = (node) => {
|
|
27
|
+
return node.hasDirective(UtilityDirective.CLIENT_ONLY);
|
|
28
|
+
};
|
|
29
|
+
export const isFilterOnly = (node) => {
|
|
30
|
+
return node.hasDirective(UtilityDirective.FILTER_ONLY);
|
|
31
|
+
};
|
|
32
|
+
export const isCreateOnly = (node) => {
|
|
33
|
+
return node.hasDirective(UtilityDirective.CREATE_ONLY);
|
|
34
|
+
};
|
|
35
|
+
export const isUpdateOnly = (node) => {
|
|
36
|
+
return node.hasDirective(UtilityDirective.UPDATE_ONLY);
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=UtilitiesPlugin.utils.js.map
|
|
@@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AC,IAAe,EAAW,EAAE;IACvD,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAe,EAAW,EAAE;IACvD,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;AACzD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/UtilitiesPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/UtilitiesPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A preset that includes all the base plugins
|
|
3
|
+
*
|
|
4
|
+
* Inludes:
|
|
5
|
+
* - `UtilitiesPlugin`
|
|
6
|
+
* - `ScalarsPlugin`
|
|
7
|
+
* - `ModelPlugin`
|
|
8
|
+
* - `RelationsPlugin`
|
|
9
|
+
* - `SchemaGeneratorPlugin`
|
|
10
|
+
* - `ModelTypesGeneratorPlugin`
|
|
11
|
+
*
|
|
12
|
+
* @returns An array of plugin factories for the base plugins.
|
|
13
|
+
*/
|
|
14
|
+
export declare function basePreset(): import("@gqlbase/core").IPluginFactory[];
|
|
15
|
+
//# sourceMappingURL=basePreset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basePreset.d.ts","sourceRoot":"","sources":["../../src/base/basePreset.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;GAYG;AAEH,wBAAgB,UAAU,6CASzB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { utilsPlugin } from "./UtilitiesPlugin/index.js";
|
|
2
|
+
import { scalarsPlugin } from "./ScalarsPlugin/index.js";
|
|
3
|
+
import { modelPlugin } from "./ModelPlugin/index.js";
|
|
4
|
+
import { relationPlugin } from "./RelationsPlugin/index.js";
|
|
5
|
+
import { schemaGeneratorPlugin } from "./SchemaGeneratorPlugin.js";
|
|
6
|
+
import { modelTypesGeneratorPlugin } from "./ModelTypesGeneratorPlugin/index.js";
|
|
7
|
+
/**
|
|
8
|
+
* A preset that includes all the base plugins
|
|
9
|
+
*
|
|
10
|
+
* Inludes:
|
|
11
|
+
* - `UtilitiesPlugin`
|
|
12
|
+
* - `ScalarsPlugin`
|
|
13
|
+
* - `ModelPlugin`
|
|
14
|
+
* - `RelationsPlugin`
|
|
15
|
+
* - `SchemaGeneratorPlugin`
|
|
16
|
+
* - `ModelTypesGeneratorPlugin`
|
|
17
|
+
*
|
|
18
|
+
* @returns An array of plugin factories for the base plugins.
|
|
19
|
+
*/
|
|
20
|
+
export function basePreset() {
|
|
21
|
+
return [
|
|
22
|
+
utilsPlugin(),
|
|
23
|
+
scalarsPlugin(),
|
|
24
|
+
modelPlugin(),
|
|
25
|
+
relationPlugin(),
|
|
26
|
+
schemaGeneratorPlugin(),
|
|
27
|
+
modelTypesGeneratorPlugin(),
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=basePreset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basePreset.js","sourceRoot":"","sources":["../../src/base/basePreset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAEjF;;;;;;;;;;;;GAYG;AAEH,MAAM,UAAU,UAAU;IACxB,OAAO;QACL,WAAW,EAAE;QACb,aAAa,EAAE;QACf,WAAW,EAAE;QACb,cAAc,EAAE;QAChB,qBAAqB,EAAE;QACvB,yBAAyB,EAAE;KAC5B,CAAC;AACJ,CAAC"}
|
package/dist/base/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { ModelPlugin, type ModelPluginOptions, ModelDirective, ModelOperation, modelPlugin, isModel, } from "./ModelPlugin/index.js";
|
|
2
|
+
export { RelationsPlugin, relationPlugin, RelationDirective, isRelationField, isOneRelationship, isManyRelationship, type FieldRelationship, type RelationPluginOptions, } from "./RelationsPlugin/index.js";
|
|
3
|
+
export { UtilitiesPlugin, UtilityDirective, utilsPlugin, isReadOnly, isClientOnly, isCreateOnly, isFilterOnly, isServerOnly, isUpdateOnly, isWriteOnly, } from "./UtilitiesPlugin/index.js";
|
|
4
|
+
export { SchemaGeneratorPlugin, schemaGeneratorPlugin } from "./SchemaGeneratorPlugin.js";
|
|
5
|
+
export { ModelTypesGeneratorPlugin, modelTypesGeneratorPlugin, } from "./ModelTypesGeneratorPlugin/index.js";
|
|
6
|
+
export { basePreset } from "./basePreset.js";
|
|
3
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/base/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,kBAAkB,EACvB,cAAc,EACd,cAAc,EACd,WAAW,EACX,OAAO,GACR,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EACL,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/base/index.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { ModelPlugin, ModelDirective, ModelOperation, modelPlugin, isModel, } from "./ModelPlugin/index.js";
|
|
2
|
+
export { RelationsPlugin, relationPlugin, RelationDirective, isRelationField, isOneRelationship, isManyRelationship, } from "./RelationsPlugin/index.js";
|
|
3
|
+
export { UtilitiesPlugin, UtilityDirective, utilsPlugin, isReadOnly, isClientOnly, isCreateOnly, isFilterOnly, isServerOnly, isUpdateOnly, isWriteOnly, } from "./UtilitiesPlugin/index.js";
|
|
4
|
+
export { SchemaGeneratorPlugin, schemaGeneratorPlugin } from "./SchemaGeneratorPlugin.js";
|
|
5
|
+
export { ModelTypesGeneratorPlugin, modelTypesGeneratorPlugin, } from "./ModelTypesGeneratorPlugin/index.js";
|
|
6
|
+
export { basePreset } from "./basePreset.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,cAAc,EACd,cAAc,EACd,WAAW,EACX,OAAO,GACR,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EACL,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ITransformerContext } from "@gqlbase/core/context";
|
|
2
|
+
import { ITransformerPlugin } from "@gqlbase/core/plugins";
|
|
3
|
+
import { DefinitionNode, InterfaceNode, ObjectNode, UnionNode } from "@gqlbase/core/definition";
|
|
4
|
+
export declare const ConnectionDirective: {
|
|
5
|
+
readonly HAS_ONE: "hasOne";
|
|
6
|
+
readonly HAS_MANY: "hasMany";
|
|
7
|
+
};
|
|
8
|
+
export declare const RelationType: {
|
|
9
|
+
readonly ONE_TO_ONE: "oneToOne";
|
|
10
|
+
readonly ONE_TO_MANY: "oneToMany";
|
|
11
|
+
readonly MANY_TO_MANY: "manyToMany";
|
|
12
|
+
};
|
|
13
|
+
type Relation = (typeof RelationType)[keyof typeof RelationType];
|
|
14
|
+
export declare const isConnectionNode: (node: DefinitionNode) => boolean;
|
|
15
|
+
export declare const isEdgeNode: (node: DefinitionNode) => boolean;
|
|
16
|
+
export interface DirectiveArgs {
|
|
17
|
+
relation?: Relation;
|
|
18
|
+
key?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface FieldConnection {
|
|
21
|
+
relation: Relation;
|
|
22
|
+
target: ObjectNode | InterfaceNode | UnionNode;
|
|
23
|
+
key?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare class ConnectionPlugin implements ITransformerPlugin {
|
|
26
|
+
readonly name = "ConnectionPlugin";
|
|
27
|
+
readonly context: ITransformerContext;
|
|
28
|
+
constructor(context: ITransformerContext);
|
|
29
|
+
private _getConnectionTarget;
|
|
30
|
+
private _getFieldConnection;
|
|
31
|
+
private _setConnectionArguments;
|
|
32
|
+
/**
|
|
33
|
+
* For one-to-many connections user should be able to add the connection key via mutations.
|
|
34
|
+
* By default the connection key is _writeOnly_ meaning we only add it to the mutation inputs.
|
|
35
|
+
*/
|
|
36
|
+
private _setConnectionKey;
|
|
37
|
+
private _createConnectionTypes;
|
|
38
|
+
private _createEdgesConnection;
|
|
39
|
+
init(): void;
|
|
40
|
+
match(definition: DefinitionNode): boolean;
|
|
41
|
+
normalize(definition: ObjectNode | InterfaceNode): void;
|
|
42
|
+
execute(definition: ObjectNode | InterfaceNode): void;
|
|
43
|
+
}
|
|
44
|
+
export declare const connectionPlugin: (options?: unknown) => import("@gqlbase/core/plugins").IPluginFactory;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=ConnectionPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionPlugin.d.ts","sourceRoot":"","sources":["../../src/relay/ConnectionPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBA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