@constructive-io/graphql-query 3.5.3 → 3.6.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/ast.js +4 -4
- package/esm/ast.js +4 -4
- package/esm/generators/select.js +6 -6
- package/generators/select.js +6 -6
- package/package.json +3 -3
package/ast.js
CHANGED
|
@@ -125,13 +125,13 @@ const getCount = ({ queryName, operationName, query, }) => {
|
|
|
125
125
|
type: t.namedType({ type: Condition }),
|
|
126
126
|
}),
|
|
127
127
|
t.variableDefinition({
|
|
128
|
-
variable: t.variable({ name: '
|
|
128
|
+
variable: t.variable({ name: 'where' }),
|
|
129
129
|
type: t.namedType({ type: Filter }),
|
|
130
130
|
}),
|
|
131
131
|
];
|
|
132
132
|
const args = [
|
|
133
133
|
t.argument({ name: 'condition', value: t.variable({ name: 'condition' }) }),
|
|
134
|
-
t.argument({ name: '
|
|
134
|
+
t.argument({ name: 'where', value: t.variable({ name: 'where' }) }),
|
|
135
135
|
];
|
|
136
136
|
// PostGraphile supports totalCount through connections
|
|
137
137
|
const opSel = [
|
|
@@ -193,7 +193,7 @@ const getMany = ({ builder, queryName, operationName, query, selection, }) => {
|
|
|
193
193
|
type: t.namedType({ type: Condition }),
|
|
194
194
|
}),
|
|
195
195
|
t.variableDefinition({
|
|
196
|
-
variable: t.variable({ name: '
|
|
196
|
+
variable: t.variable({ name: 'where' }),
|
|
197
197
|
type: t.namedType({ type: Filter }),
|
|
198
198
|
}),
|
|
199
199
|
t.variableDefinition({
|
|
@@ -213,7 +213,7 @@ const getMany = ({ builder, queryName, operationName, query, selection, }) => {
|
|
|
213
213
|
name: 'condition',
|
|
214
214
|
value: t.variable({ name: 'condition' }),
|
|
215
215
|
}),
|
|
216
|
-
t.argument({ name: '
|
|
216
|
+
t.argument({ name: 'where', value: t.variable({ name: 'where' }) }),
|
|
217
217
|
t.argument({ name: 'orderBy', value: t.variable({ name: 'orderBy' }) }),
|
|
218
218
|
];
|
|
219
219
|
const pageInfoFields = [
|
package/esm/ast.js
CHANGED
|
@@ -87,13 +87,13 @@ export const getCount = ({ queryName, operationName, query, }) => {
|
|
|
87
87
|
type: t.namedType({ type: Condition }),
|
|
88
88
|
}),
|
|
89
89
|
t.variableDefinition({
|
|
90
|
-
variable: t.variable({ name: '
|
|
90
|
+
variable: t.variable({ name: 'where' }),
|
|
91
91
|
type: t.namedType({ type: Filter }),
|
|
92
92
|
}),
|
|
93
93
|
];
|
|
94
94
|
const args = [
|
|
95
95
|
t.argument({ name: 'condition', value: t.variable({ name: 'condition' }) }),
|
|
96
|
-
t.argument({ name: '
|
|
96
|
+
t.argument({ name: 'where', value: t.variable({ name: 'where' }) }),
|
|
97
97
|
];
|
|
98
98
|
// PostGraphile supports totalCount through connections
|
|
99
99
|
const opSel = [
|
|
@@ -154,7 +154,7 @@ export const getMany = ({ builder, queryName, operationName, query, selection, }
|
|
|
154
154
|
type: t.namedType({ type: Condition }),
|
|
155
155
|
}),
|
|
156
156
|
t.variableDefinition({
|
|
157
|
-
variable: t.variable({ name: '
|
|
157
|
+
variable: t.variable({ name: 'where' }),
|
|
158
158
|
type: t.namedType({ type: Filter }),
|
|
159
159
|
}),
|
|
160
160
|
t.variableDefinition({
|
|
@@ -174,7 +174,7 @@ export const getMany = ({ builder, queryName, operationName, query, selection, }
|
|
|
174
174
|
name: 'condition',
|
|
175
175
|
value: t.variable({ name: 'condition' }),
|
|
176
176
|
}),
|
|
177
|
-
t.argument({ name: '
|
|
177
|
+
t.argument({ name: 'where', value: t.variable({ name: 'where' }) }),
|
|
178
178
|
t.argument({ name: 'orderBy', value: t.variable({ name: 'orderBy' }) }),
|
|
179
179
|
];
|
|
180
180
|
const pageInfoFields = [
|
package/esm/generators/select.js
CHANGED
|
@@ -304,12 +304,12 @@ function generateSelectQueryAST(table, allTables, selection, options, relationFi
|
|
|
304
304
|
// Add filter variables if needed
|
|
305
305
|
if (options.where) {
|
|
306
306
|
variableDefinitions.push(t.variableDefinition({
|
|
307
|
-
variable: t.variable({ name: '
|
|
307
|
+
variable: t.variable({ name: 'where' }),
|
|
308
308
|
type: t.namedType({ type: toFilterTypeName(table.name, table) }),
|
|
309
309
|
}));
|
|
310
310
|
queryArgs.push(t.argument({
|
|
311
|
-
name: '
|
|
312
|
-
value: t.variable({ name: '
|
|
311
|
+
name: 'where',
|
|
312
|
+
value: t.variable({ name: 'where' }),
|
|
313
313
|
}));
|
|
314
314
|
}
|
|
315
315
|
// Add orderBy variables if needed
|
|
@@ -634,7 +634,7 @@ function generateCountQueryAST(table) {
|
|
|
634
634
|
name: `${pluralName}CountQuery`,
|
|
635
635
|
variableDefinitions: [
|
|
636
636
|
t.variableDefinition({
|
|
637
|
-
variable: t.variable({ name: '
|
|
637
|
+
variable: t.variable({ name: 'where' }),
|
|
638
638
|
type: t.namedType({ type: toFilterTypeName(table.name, table) }),
|
|
639
639
|
}),
|
|
640
640
|
],
|
|
@@ -644,8 +644,8 @@ function generateCountQueryAST(table) {
|
|
|
644
644
|
name: pluralName,
|
|
645
645
|
args: [
|
|
646
646
|
t.argument({
|
|
647
|
-
name: '
|
|
648
|
-
value: t.variable({ name: '
|
|
647
|
+
name: 'where',
|
|
648
|
+
value: t.variable({ name: 'where' }),
|
|
649
649
|
}),
|
|
650
650
|
],
|
|
651
651
|
selectionSet: t.selectionSet({
|
package/generators/select.js
CHANGED
|
@@ -348,12 +348,12 @@ function generateSelectQueryAST(table, allTables, selection, options, relationFi
|
|
|
348
348
|
// Add filter variables if needed
|
|
349
349
|
if (options.where) {
|
|
350
350
|
variableDefinitions.push(t.variableDefinition({
|
|
351
|
-
variable: t.variable({ name: '
|
|
351
|
+
variable: t.variable({ name: 'where' }),
|
|
352
352
|
type: t.namedType({ type: (0, naming_helpers_1.toFilterTypeName)(table.name, table) }),
|
|
353
353
|
}));
|
|
354
354
|
queryArgs.push(t.argument({
|
|
355
|
-
name: '
|
|
356
|
-
value: t.variable({ name: '
|
|
355
|
+
name: 'where',
|
|
356
|
+
value: t.variable({ name: 'where' }),
|
|
357
357
|
}));
|
|
358
358
|
}
|
|
359
359
|
// Add orderBy variables if needed
|
|
@@ -678,7 +678,7 @@ function generateCountQueryAST(table) {
|
|
|
678
678
|
name: `${pluralName}CountQuery`,
|
|
679
679
|
variableDefinitions: [
|
|
680
680
|
t.variableDefinition({
|
|
681
|
-
variable: t.variable({ name: '
|
|
681
|
+
variable: t.variable({ name: 'where' }),
|
|
682
682
|
type: t.namedType({ type: (0, naming_helpers_1.toFilterTypeName)(table.name, table) }),
|
|
683
683
|
}),
|
|
684
684
|
],
|
|
@@ -688,8 +688,8 @@ function generateCountQueryAST(table) {
|
|
|
688
688
|
name: pluralName,
|
|
689
689
|
args: [
|
|
690
690
|
t.argument({
|
|
691
|
-
name: '
|
|
692
|
-
value: t.variable({ name: '
|
|
691
|
+
name: 'where',
|
|
692
|
+
value: t.variable({ name: 'where' }),
|
|
693
693
|
}),
|
|
694
694
|
],
|
|
695
695
|
selectionSet: t.selectionSet({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-query",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Constructive GraphQL Query",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"main": "index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"grafast": "1.0.0-rc.7",
|
|
35
35
|
"graphile-build-pg": "5.0.0-rc.5",
|
|
36
36
|
"graphile-config": "1.0.0-rc.5",
|
|
37
|
-
"graphile-settings": "^4.
|
|
37
|
+
"graphile-settings": "^4.9.0",
|
|
38
38
|
"graphql": "^16.13.0",
|
|
39
39
|
"inflection": "^3.0.0",
|
|
40
40
|
"inflekt": "^0.3.3",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"makage": "^0.1.10"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "1ade5f10df8e38a5f87bbd2e2f7ec2ba97267079"
|
|
55
55
|
}
|