@constructive-io/graphql-codegen 2.22.1 → 2.23.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/cli/codegen/barrel.d.ts +5 -1
- package/cli/codegen/barrel.js +13 -11
- package/cli/codegen/index.d.ts +3 -3
- package/cli/codegen/index.js +15 -9
- package/cli/codegen/orm/client-generator.js +3 -2
- package/cli/codegen/orm/custom-ops-generator.js +17 -4
- package/cli/codegen/orm/input-types-generator.js +129 -18
- package/cli/codegen/orm/model-generator.js +2 -1
- package/cli/codegen/orm/query-builder.d.ts +1 -1
- package/cli/codegen/orm/query-builder.js +2 -2
- package/cli/codegen/schema-types-generator.js +5 -5
- package/cli/codegen/utils.d.ts +6 -1
- package/cli/codegen/utils.js +23 -8
- package/cli/commands/generate-orm.d.ts +5 -3
- package/cli/commands/generate-orm.js +65 -84
- package/cli/commands/generate.d.ts +2 -0
- package/cli/commands/generate.js +66 -87
- package/cli/commands/shared.d.ts +74 -0
- package/cli/commands/shared.js +88 -0
- package/cli/index.js +75 -45
- package/cli/introspect/index.d.ts +8 -5
- package/cli/introspect/index.js +19 -7
- package/cli/introspect/infer-tables.d.ts +51 -0
- package/cli/introspect/infer-tables.js +550 -0
- package/cli/introspect/source/endpoint.d.ts +34 -0
- package/cli/introspect/source/endpoint.js +35 -0
- package/cli/introspect/source/file.d.ts +20 -0
- package/cli/introspect/source/file.js +103 -0
- package/cli/introspect/source/index.d.ts +48 -0
- package/cli/introspect/source/index.js +72 -0
- package/cli/introspect/source/types.d.ts +58 -0
- package/cli/introspect/source/types.js +27 -0
- package/cli/introspect/transform.d.ts +5 -6
- package/cli/introspect/transform.js +0 -173
- package/cli/watch/cache.d.ts +3 -4
- package/cli/watch/cache.js +6 -10
- package/cli/watch/poller.d.ts +1 -2
- package/cli/watch/poller.js +27 -45
- package/cli/watch/types.d.ts +0 -3
- package/core/ast.js +4 -4
- package/core/query-builder.js +12 -12
- package/esm/cli/codegen/barrel.d.ts +5 -1
- package/esm/cli/codegen/barrel.js +13 -11
- package/esm/cli/codegen/index.d.ts +3 -3
- package/esm/cli/codegen/index.js +18 -12
- package/esm/cli/codegen/orm/client-generator.js +3 -2
- package/esm/cli/codegen/orm/custom-ops-generator.js +18 -5
- package/esm/cli/codegen/orm/input-types-generator.js +130 -19
- package/esm/cli/codegen/orm/model-generator.js +3 -2
- package/esm/cli/codegen/orm/query-builder.d.ts +1 -1
- package/esm/cli/codegen/orm/query-builder.js +2 -2
- package/esm/cli/codegen/schema-types-generator.js +6 -6
- package/esm/cli/codegen/utils.d.ts +6 -1
- package/esm/cli/codegen/utils.js +22 -8
- package/esm/cli/commands/generate-orm.d.ts +5 -3
- package/esm/cli/commands/generate-orm.js +65 -84
- package/esm/cli/commands/generate.d.ts +2 -0
- package/esm/cli/commands/generate.js +66 -87
- package/esm/cli/commands/shared.d.ts +74 -0
- package/esm/cli/commands/shared.js +84 -0
- package/esm/cli/index.js +76 -46
- package/esm/cli/introspect/index.d.ts +8 -5
- package/esm/cli/introspect/index.js +10 -3
- package/esm/cli/introspect/infer-tables.d.ts +51 -0
- package/esm/cli/introspect/infer-tables.js +547 -0
- package/esm/cli/introspect/source/endpoint.d.ts +34 -0
- package/esm/cli/introspect/source/endpoint.js +31 -0
- package/esm/cli/introspect/source/file.d.ts +20 -0
- package/esm/cli/introspect/source/file.js +66 -0
- package/esm/cli/introspect/source/index.d.ts +48 -0
- package/esm/cli/introspect/source/index.js +54 -0
- package/esm/cli/introspect/source/types.d.ts +58 -0
- package/esm/cli/introspect/source/types.js +23 -0
- package/esm/cli/introspect/transform.d.ts +5 -6
- package/esm/cli/introspect/transform.js +0 -172
- package/esm/cli/watch/cache.d.ts +3 -4
- package/esm/cli/watch/cache.js +7 -11
- package/esm/cli/watch/poller.d.ts +1 -2
- package/esm/cli/watch/poller.js +28 -46
- package/esm/cli/watch/types.d.ts +0 -3
- package/esm/core/ast.js +4 -4
- package/esm/core/query-builder.js +12 -12
- package/esm/generators/mutations.js +3 -3
- package/esm/generators/select.js +7 -7
- package/esm/types/config.d.ts +21 -5
- package/esm/types/config.js +2 -1
- package/generators/mutations.js +3 -3
- package/generators/select.js +7 -7
- package/package.json +5 -3
- package/types/config.d.ts +21 -5
- package/types/config.js +2 -1
- package/cli/introspect/fetch-meta.d.ts +0 -31
- package/cli/introspect/fetch-meta.js +0 -108
- package/cli/introspect/meta-query.d.ts +0 -111
- package/cli/introspect/meta-query.js +0 -191
- package/esm/cli/introspect/fetch-meta.d.ts +0 -31
- package/esm/cli/introspect/fetch-meta.js +0 -104
- package/esm/cli/introspect/meta-query.d.ts +0 -111
- package/esm/cli/introspect/meta-query.js +0 -188
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The _meta GraphQL query for introspecting PostGraphile schema
|
|
3
|
-
* This query fetches all table metadata including fields, constraints, and relations
|
|
4
|
-
*/
|
|
5
|
-
export const META_QUERY = `
|
|
6
|
-
query Meta {
|
|
7
|
-
_meta {
|
|
8
|
-
tables {
|
|
9
|
-
name
|
|
10
|
-
query {
|
|
11
|
-
all
|
|
12
|
-
create
|
|
13
|
-
delete
|
|
14
|
-
one
|
|
15
|
-
update
|
|
16
|
-
}
|
|
17
|
-
fields {
|
|
18
|
-
name
|
|
19
|
-
type {
|
|
20
|
-
gqlType
|
|
21
|
-
isArray
|
|
22
|
-
modifier
|
|
23
|
-
pgAlias
|
|
24
|
-
pgType
|
|
25
|
-
subtype
|
|
26
|
-
typmod
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
inflection {
|
|
30
|
-
allRows
|
|
31
|
-
allRowsSimple
|
|
32
|
-
conditionType
|
|
33
|
-
connection
|
|
34
|
-
createField
|
|
35
|
-
createInputType
|
|
36
|
-
createPayloadType
|
|
37
|
-
deleteByPrimaryKey
|
|
38
|
-
deletePayloadType
|
|
39
|
-
edge
|
|
40
|
-
edgeField
|
|
41
|
-
enumType
|
|
42
|
-
filterType
|
|
43
|
-
inputType
|
|
44
|
-
orderByType
|
|
45
|
-
patchField
|
|
46
|
-
patchType
|
|
47
|
-
tableFieldName
|
|
48
|
-
tableType
|
|
49
|
-
typeName
|
|
50
|
-
updateByPrimaryKey
|
|
51
|
-
updatePayloadType
|
|
52
|
-
}
|
|
53
|
-
primaryKeyConstraints {
|
|
54
|
-
name
|
|
55
|
-
fields {
|
|
56
|
-
name
|
|
57
|
-
type {
|
|
58
|
-
gqlType
|
|
59
|
-
isArray
|
|
60
|
-
modifier
|
|
61
|
-
pgAlias
|
|
62
|
-
pgType
|
|
63
|
-
subtype
|
|
64
|
-
typmod
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
uniqueConstraints {
|
|
69
|
-
name
|
|
70
|
-
fields {
|
|
71
|
-
name
|
|
72
|
-
type {
|
|
73
|
-
gqlType
|
|
74
|
-
isArray
|
|
75
|
-
modifier
|
|
76
|
-
pgAlias
|
|
77
|
-
pgType
|
|
78
|
-
subtype
|
|
79
|
-
typmod
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
foreignKeyConstraints {
|
|
84
|
-
name
|
|
85
|
-
fields {
|
|
86
|
-
name
|
|
87
|
-
type {
|
|
88
|
-
gqlType
|
|
89
|
-
isArray
|
|
90
|
-
modifier
|
|
91
|
-
pgAlias
|
|
92
|
-
pgType
|
|
93
|
-
subtype
|
|
94
|
-
typmod
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
refFields {
|
|
98
|
-
name
|
|
99
|
-
type {
|
|
100
|
-
gqlType
|
|
101
|
-
isArray
|
|
102
|
-
modifier
|
|
103
|
-
pgAlias
|
|
104
|
-
pgType
|
|
105
|
-
subtype
|
|
106
|
-
typmod
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
refTable {
|
|
110
|
-
name
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
relations {
|
|
114
|
-
belongsTo {
|
|
115
|
-
fieldName
|
|
116
|
-
isUnique
|
|
117
|
-
keys {
|
|
118
|
-
name
|
|
119
|
-
type {
|
|
120
|
-
gqlType
|
|
121
|
-
isArray
|
|
122
|
-
modifier
|
|
123
|
-
pgAlias
|
|
124
|
-
pgType
|
|
125
|
-
subtype
|
|
126
|
-
typmod
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
references {
|
|
130
|
-
name
|
|
131
|
-
}
|
|
132
|
-
type
|
|
133
|
-
}
|
|
134
|
-
hasOne {
|
|
135
|
-
fieldName
|
|
136
|
-
isUnique
|
|
137
|
-
keys {
|
|
138
|
-
name
|
|
139
|
-
type {
|
|
140
|
-
gqlType
|
|
141
|
-
isArray
|
|
142
|
-
modifier
|
|
143
|
-
pgAlias
|
|
144
|
-
pgType
|
|
145
|
-
subtype
|
|
146
|
-
typmod
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
referencedBy {
|
|
150
|
-
name
|
|
151
|
-
}
|
|
152
|
-
type
|
|
153
|
-
}
|
|
154
|
-
hasMany {
|
|
155
|
-
fieldName
|
|
156
|
-
isUnique
|
|
157
|
-
keys {
|
|
158
|
-
name
|
|
159
|
-
type {
|
|
160
|
-
gqlType
|
|
161
|
-
isArray
|
|
162
|
-
modifier
|
|
163
|
-
pgAlias
|
|
164
|
-
pgType
|
|
165
|
-
subtype
|
|
166
|
-
typmod
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
referencedBy {
|
|
170
|
-
name
|
|
171
|
-
}
|
|
172
|
-
type
|
|
173
|
-
}
|
|
174
|
-
manyToMany {
|
|
175
|
-
fieldName
|
|
176
|
-
junctionTable {
|
|
177
|
-
name
|
|
178
|
-
}
|
|
179
|
-
rightTable {
|
|
180
|
-
name
|
|
181
|
-
}
|
|
182
|
-
type
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
`;
|