@constructive-io/graphql-codegen 4.6.1 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/error.d.ts +2 -93
- package/client/error.js +9 -273
- package/client/execute.d.ts +2 -55
- package/client/execute.js +5 -120
- package/client/typed-document.d.ts +2 -29
- package/client/typed-document.js +3 -39
- package/core/ast.d.ts +8 -10
- package/core/ast.js +17 -592
- package/core/custom-ast.d.ts +5 -33
- package/core/custom-ast.js +16 -203
- package/core/introspect/infer-tables.d.ts +2 -40
- package/core/introspect/infer-tables.js +4 -696
- package/core/introspect/schema-query.d.ts +3 -18
- package/core/introspect/schema-query.js +3 -118
- package/core/introspect/transform-schema.d.ts +2 -84
- package/core/introspect/transform-schema.js +14 -279
- package/core/introspect/transform.d.ts +2 -18
- package/core/introspect/transform.js +6 -39
- package/core/meta-object/convert.d.ts +2 -63
- package/core/meta-object/convert.js +4 -59
- package/core/meta-object/validate.d.ts +2 -7
- package/core/meta-object/validate.js +4 -30
- package/core/query-builder.d.ts +7 -46
- package/core/query-builder.js +8 -408
- package/core/types.d.ts +9 -139
- package/core/types.js +12 -26
- package/esm/client/error.d.ts +2 -93
- package/esm/client/error.js +2 -269
- package/esm/client/execute.d.ts +2 -55
- package/esm/client/execute.js +2 -118
- package/esm/client/typed-document.d.ts +2 -29
- package/esm/client/typed-document.js +2 -38
- package/esm/core/ast.d.ts +8 -10
- package/esm/core/ast.js +8 -550
- package/esm/core/custom-ast.d.ts +5 -33
- package/esm/core/custom-ast.js +5 -160
- package/esm/core/introspect/infer-tables.d.ts +2 -40
- package/esm/core/introspect/infer-tables.js +2 -695
- package/esm/core/introspect/schema-query.d.ts +3 -18
- package/esm/core/introspect/schema-query.js +2 -118
- package/esm/core/introspect/transform-schema.d.ts +2 -84
- package/esm/core/introspect/transform-schema.js +2 -269
- package/esm/core/introspect/transform.d.ts +2 -18
- package/esm/core/introspect/transform.js +2 -36
- package/esm/core/meta-object/convert.d.ts +2 -63
- package/esm/core/meta-object/convert.js +2 -58
- package/esm/core/meta-object/validate.d.ts +2 -7
- package/esm/core/meta-object/validate.js +2 -26
- package/esm/core/query-builder.d.ts +7 -46
- package/esm/core/query-builder.js +5 -373
- package/esm/core/types.d.ts +9 -139
- package/esm/core/types.js +9 -24
- package/esm/generators/field-selector.d.ts +5 -28
- package/esm/generators/field-selector.js +5 -379
- package/esm/generators/mutations.d.ts +5 -28
- package/esm/generators/mutations.js +5 -198
- package/esm/generators/naming-helpers.d.ts +3 -45
- package/esm/generators/naming-helpers.js +3 -151
- package/esm/generators/select.d.ts +6 -37
- package/esm/generators/select.js +6 -659
- package/generators/field-selector.d.ts +5 -28
- package/generators/field-selector.js +12 -385
- package/generators/mutations.d.ts +5 -28
- package/generators/mutations.js +9 -234
- package/generators/naming-helpers.d.ts +3 -45
- package/generators/naming-helpers.js +15 -164
- package/generators/select.d.ts +6 -37
- package/generators/select.js +17 -703
- package/package.json +10 -9
- package/core/meta-object/format.json +0 -93
- package/esm/core/meta-object/format.json +0 -93
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-codegen",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"description": "GraphQL SDK generator for Constructive databases with React Query hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -56,24 +56,25 @@
|
|
|
56
56
|
"@0no-co/graphql.web": "^1.1.2",
|
|
57
57
|
"@babel/generator": "^7.28.6",
|
|
58
58
|
"@babel/types": "^7.28.6",
|
|
59
|
-
"@constructive-io/graphql-
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
59
|
+
"@constructive-io/graphql-query": "^3.3.1",
|
|
60
|
+
"@constructive-io/graphql-types": "^3.1.2",
|
|
61
|
+
"@inquirerer/utils": "^3.3.1",
|
|
62
|
+
"@pgpmjs/core": "^6.4.1",
|
|
62
63
|
"ajv": "^8.17.1",
|
|
63
64
|
"deepmerge": "^4.3.1",
|
|
64
65
|
"find-and-require-package-json": "^0.9.0",
|
|
65
66
|
"gql-ast": "^3.1.0",
|
|
66
|
-
"graphile-schema": "^1.
|
|
67
|
+
"graphile-schema": "^1.3.1",
|
|
67
68
|
"graphql": "^16.9.0",
|
|
68
69
|
"inflekt": "^0.3.1",
|
|
69
|
-
"inquirerer": "^4.
|
|
70
|
+
"inquirerer": "^4.5.2",
|
|
70
71
|
"jiti": "^2.6.1",
|
|
71
72
|
"komoji": "^0.8.0",
|
|
72
73
|
"oxfmt": "^0.26.0",
|
|
73
74
|
"pg-cache": "^3.1.0",
|
|
74
75
|
"pg-env": "^1.5.0",
|
|
75
|
-
"pgsql-client": "^3.
|
|
76
|
-
"pgsql-seed": "^2.
|
|
76
|
+
"pgsql-client": "^3.3.1",
|
|
77
|
+
"pgsql-seed": "^2.3.1",
|
|
77
78
|
"undici": "^7.19.0"
|
|
78
79
|
},
|
|
79
80
|
"peerDependencies": {
|
|
@@ -100,5 +101,5 @@
|
|
|
100
101
|
"tsx": "^4.21.0",
|
|
101
102
|
"typescript": "^5.9.3"
|
|
102
103
|
},
|
|
103
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "1c9efe4ecd5a6b8daa14fe42214ecf8c5b664198"
|
|
104
105
|
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "root",
|
|
3
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"definitions": {
|
|
6
|
-
"field": {
|
|
7
|
-
"type": "object",
|
|
8
|
-
"required": ["name", "type"],
|
|
9
|
-
"additionalProperties": true,
|
|
10
|
-
"properties": {
|
|
11
|
-
"name": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"default": "id",
|
|
14
|
-
"examples": ["id"]
|
|
15
|
-
},
|
|
16
|
-
"type": {
|
|
17
|
-
"type": "object",
|
|
18
|
-
"required": ["pgType", "gqlType"],
|
|
19
|
-
"additionalProperties": true,
|
|
20
|
-
"properties": {
|
|
21
|
-
"gqlType": {
|
|
22
|
-
"type": ["string", "null"]
|
|
23
|
-
},
|
|
24
|
-
"pgType": {
|
|
25
|
-
"type": ["string", "null"]
|
|
26
|
-
},
|
|
27
|
-
"subtype": {
|
|
28
|
-
"type": ["string", "null"]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"properties": {
|
|
36
|
-
"tables": {
|
|
37
|
-
"type": "array",
|
|
38
|
-
"items": {
|
|
39
|
-
"type": "object",
|
|
40
|
-
"properties": {
|
|
41
|
-
"name": {
|
|
42
|
-
"type": "string",
|
|
43
|
-
"default": "User",
|
|
44
|
-
"examples": ["User"]
|
|
45
|
-
},
|
|
46
|
-
"fields": {
|
|
47
|
-
"type": "array",
|
|
48
|
-
"items": {
|
|
49
|
-
"$ref": "#/definitions/field"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"primaryConstraints": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"items": {
|
|
55
|
-
"$ref": "#/definitions/field"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"uniqueConstraints": {
|
|
59
|
-
"type": "array",
|
|
60
|
-
"items": {
|
|
61
|
-
"$ref": "#/definitions/field"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"foreignConstraints": {
|
|
65
|
-
"type": "array",
|
|
66
|
-
"items": {
|
|
67
|
-
"type": "object",
|
|
68
|
-
"properties": {
|
|
69
|
-
"refTable": {
|
|
70
|
-
"type": "string",
|
|
71
|
-
"default": "User",
|
|
72
|
-
"examples": ["User"]
|
|
73
|
-
},
|
|
74
|
-
"fromKey": {
|
|
75
|
-
"$ref": "#/definitions/field"
|
|
76
|
-
},
|
|
77
|
-
"toKey": {
|
|
78
|
-
"$ref": "#/definitions/field"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"required": ["refTable", "fromKey", "toKey"],
|
|
82
|
-
"additionalProperties": false
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"required": ["name", "fields"],
|
|
87
|
-
"additionalProperties": false
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"required": ["tables"],
|
|
92
|
-
"additionalProperties": false
|
|
93
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "root",
|
|
3
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"definitions": {
|
|
6
|
-
"field": {
|
|
7
|
-
"type": "object",
|
|
8
|
-
"required": ["name", "type"],
|
|
9
|
-
"additionalProperties": true,
|
|
10
|
-
"properties": {
|
|
11
|
-
"name": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"default": "id",
|
|
14
|
-
"examples": ["id"]
|
|
15
|
-
},
|
|
16
|
-
"type": {
|
|
17
|
-
"type": "object",
|
|
18
|
-
"required": ["pgType", "gqlType"],
|
|
19
|
-
"additionalProperties": true,
|
|
20
|
-
"properties": {
|
|
21
|
-
"gqlType": {
|
|
22
|
-
"type": ["string", "null"]
|
|
23
|
-
},
|
|
24
|
-
"pgType": {
|
|
25
|
-
"type": ["string", "null"]
|
|
26
|
-
},
|
|
27
|
-
"subtype": {
|
|
28
|
-
"type": ["string", "null"]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"properties": {
|
|
36
|
-
"tables": {
|
|
37
|
-
"type": "array",
|
|
38
|
-
"items": {
|
|
39
|
-
"type": "object",
|
|
40
|
-
"properties": {
|
|
41
|
-
"name": {
|
|
42
|
-
"type": "string",
|
|
43
|
-
"default": "User",
|
|
44
|
-
"examples": ["User"]
|
|
45
|
-
},
|
|
46
|
-
"fields": {
|
|
47
|
-
"type": "array",
|
|
48
|
-
"items": {
|
|
49
|
-
"$ref": "#/definitions/field"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"primaryConstraints": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"items": {
|
|
55
|
-
"$ref": "#/definitions/field"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"uniqueConstraints": {
|
|
59
|
-
"type": "array",
|
|
60
|
-
"items": {
|
|
61
|
-
"$ref": "#/definitions/field"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"foreignConstraints": {
|
|
65
|
-
"type": "array",
|
|
66
|
-
"items": {
|
|
67
|
-
"type": "object",
|
|
68
|
-
"properties": {
|
|
69
|
-
"refTable": {
|
|
70
|
-
"type": "string",
|
|
71
|
-
"default": "User",
|
|
72
|
-
"examples": ["User"]
|
|
73
|
-
},
|
|
74
|
-
"fromKey": {
|
|
75
|
-
"$ref": "#/definitions/field"
|
|
76
|
-
},
|
|
77
|
-
"toKey": {
|
|
78
|
-
"$ref": "#/definitions/field"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"required": ["refTable", "fromKey", "toKey"],
|
|
82
|
-
"additionalProperties": false
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"required": ["name", "fields"],
|
|
87
|
-
"additionalProperties": false
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"required": ["tables"],
|
|
92
|
-
"additionalProperties": false
|
|
93
|
-
}
|