@smartive/graphql-magic 16.1.4 → 16.2.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/.github/workflows/testing.yml +34 -11
- package/CHANGELOG.md +10 -2
- package/README.md +5 -1
- package/dist/bin/gqm.cjs +15 -1
- package/dist/cjs/index.cjs +42 -1
- package/dist/esm/resolvers/filters.js +22 -0
- package/dist/esm/resolvers/filters.js.map +1 -1
- package/dist/esm/schema/generate.js +14 -0
- package/dist/esm/schema/generate.js.map +1 -1
- package/docs/package-lock.json +178 -175
- package/docs/package.json +6 -6
- package/migrations/20230912185644_setup.ts +8 -37
- package/package.json +9 -9
- package/src/resolvers/filters.ts +30 -0
- package/src/schema/generate.ts +14 -0
- package/tests/api/__snapshots__/query.spec.ts.snap +36 -0
- package/tests/api/query.spec.ts +43 -1
- package/tests/generated/api/index.ts +22 -0
- package/tests/generated/client/index.ts +55 -0
- package/tests/generated/db/index.ts +27 -27
- package/tests/generated/models.json +2 -1
- package/tests/generated/schema.graphql +22 -0
- package/tests/utils/models.ts +1 -0
- package/tests/utils/server.ts +8 -16
|
@@ -3,18 +3,18 @@ import { Knex } from 'knex';
|
|
|
3
3
|
export const up = async (knex: Knex) => {
|
|
4
4
|
await knex.raw(`CREATE TYPE "someEnum" AS ENUM ('A','B','C')`);
|
|
5
5
|
|
|
6
|
-
await knex.raw(`CREATE TYPE "
|
|
6
|
+
await knex.raw(`CREATE TYPE "role" AS ENUM ('ADMIN','USER')`);
|
|
7
7
|
|
|
8
|
-
await knex.
|
|
9
|
-
table.string('username', undefined);
|
|
10
|
-
});
|
|
8
|
+
await knex.raw(`CREATE TYPE "reactionType" AS ENUM ('Review','Question','Answer')`);
|
|
11
9
|
|
|
12
|
-
await knex.schema.
|
|
10
|
+
await knex.schema.createTable('User', (table) => {
|
|
11
|
+
table.uuid('id').notNullable().primary();
|
|
12
|
+
table.string('username', undefined).nullable();
|
|
13
13
|
table.enum('role', null as any, {
|
|
14
14
|
useNative: true,
|
|
15
15
|
existingType: true,
|
|
16
16
|
enumName: 'role',
|
|
17
|
-
}).nullable()
|
|
17
|
+
}).nullable();
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
await knex.schema.createTable('AnotherObject', (table) => {
|
|
@@ -101,29 +101,9 @@ export const up = async (knex: Knex) => {
|
|
|
101
101
|
table.decimal('rating', undefined, undefined).nullable();
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
-
await knex.schema.alterTable('User', (table) => {
|
|
105
|
-
table.dropColumn('createdAt');
|
|
106
|
-
table.dropColumn('updatedAt');
|
|
107
|
-
});
|
|
108
|
-
|
|
109
104
|
};
|
|
110
105
|
|
|
111
106
|
export const down = async (knex: Knex) => {
|
|
112
|
-
await knex.schema.alterTable('User', (table) => {
|
|
113
|
-
table.timestamp('createdAt');
|
|
114
|
-
table.timestamp('updatedAt');
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
await knex('User').update({
|
|
118
|
-
createdAt: 'TODO',
|
|
119
|
-
updatedAt: 'TODO',
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
await knex.schema.alterTable('User', (table) => {
|
|
123
|
-
table.timestamp('createdAt').notNullable().alter();
|
|
124
|
-
table.timestamp('updatedAt').notNullable().alter();
|
|
125
|
-
});
|
|
126
|
-
|
|
127
107
|
await knex.schema.dropTable('ReviewRevision');
|
|
128
108
|
|
|
129
109
|
await knex.schema.dropTable('Review');
|
|
@@ -138,19 +118,10 @@ export const down = async (knex: Knex) => {
|
|
|
138
118
|
|
|
139
119
|
await knex.schema.dropTable('AnotherObject');
|
|
140
120
|
|
|
141
|
-
await knex.schema.
|
|
142
|
-
table.enum('role', null as any, {
|
|
143
|
-
useNative: true,
|
|
144
|
-
existingType: true,
|
|
145
|
-
enumName: 'role',
|
|
146
|
-
}).notNullable().alter();
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
await knex.schema.alterTable('User', (table) => {
|
|
150
|
-
table.dropColumn('username');
|
|
151
|
-
});
|
|
121
|
+
await knex.schema.dropTable('User');
|
|
152
122
|
|
|
153
123
|
await knex.raw('DROP TYPE "reactionType"');
|
|
124
|
+
await knex.raw('DROP TYPE "role"');
|
|
154
125
|
await knex.raw('DROP TYPE "someEnum"');
|
|
155
126
|
};
|
|
156
127
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartive/graphql-magic",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"overrides": {
|
|
38
38
|
"graphql": "$graphql",
|
|
39
|
-
"rollup": "3.29.
|
|
39
|
+
"rollup": "3.29.5"
|
|
40
40
|
},
|
|
41
41
|
"browserslist": "> 0.25%, not dead",
|
|
42
42
|
"publishConfig": {
|
|
@@ -71,21 +71,21 @@
|
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@smartive/eslint-config": "3.3.0",
|
|
73
73
|
"@smartive/prettier-config": "3.1.2",
|
|
74
|
-
"@types/jest": "29.5.
|
|
75
|
-
"@types/lodash": "4.17.
|
|
74
|
+
"@types/jest": "29.5.13",
|
|
75
|
+
"@types/lodash": "4.17.10",
|
|
76
76
|
"@types/luxon": "3.4.2",
|
|
77
|
-
"@types/pg": "8.11.
|
|
77
|
+
"@types/pg": "8.11.10",
|
|
78
78
|
"@types/uuid": "9.0.8",
|
|
79
79
|
"create-ts-index": "1.14.0",
|
|
80
80
|
"del-cli": "5.1.0",
|
|
81
|
-
"esbuild": "0.
|
|
82
|
-
"eslint": "8.57.
|
|
81
|
+
"esbuild": "0.24.0",
|
|
82
|
+
"eslint": "8.57.1",
|
|
83
83
|
"graphql-request": "6.1.0",
|
|
84
84
|
"jest": "29.7.0",
|
|
85
85
|
"mock-knex": "0.4.13",
|
|
86
86
|
"prettier": "2.8.8",
|
|
87
|
-
"ts-jest": "29.
|
|
87
|
+
"ts-jest": "29.2.5",
|
|
88
88
|
"ts-node": "10.9.2",
|
|
89
|
-
"typescript": "5.5.
|
|
89
|
+
"typescript": "5.5.4"
|
|
90
90
|
}
|
|
91
91
|
}
|
package/src/resolvers/filters.ts
CHANGED
|
@@ -84,6 +84,36 @@ const applyWhere = (node: WhereNode, where: Where, ops: QueryBuilderOps, joins:
|
|
|
84
84
|
for (const key of Object.keys(where)) {
|
|
85
85
|
const value = where[key];
|
|
86
86
|
|
|
87
|
+
if (key === 'NOT') {
|
|
88
|
+
const subOps: QueryBuilderOps = [];
|
|
89
|
+
applyWhere(node, value as Where, subOps, joins);
|
|
90
|
+
ops.push((query) => query.whereNot((subQuery) => apply(subQuery, subOps)));
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (key === 'AND') {
|
|
95
|
+
for (const subWhere of value as Where[]) {
|
|
96
|
+
applyWhere(node, subWhere, ops, joins);
|
|
97
|
+
}
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (key === 'OR') {
|
|
102
|
+
const allSubOps: QueryBuilderOps[] = [];
|
|
103
|
+
for (const subWhere of value as Where[]) {
|
|
104
|
+
const subOps: QueryBuilderOps = [];
|
|
105
|
+
applyWhere(node, subWhere, subOps, joins);
|
|
106
|
+
allSubOps.push(subOps);
|
|
107
|
+
}
|
|
108
|
+
ops.push((query) =>
|
|
109
|
+
ors(
|
|
110
|
+
query,
|
|
111
|
+
allSubOps.map((subOps) => (subQuery) => apply(subQuery, subOps))
|
|
112
|
+
)
|
|
113
|
+
);
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
|
|
87
117
|
const specialFilter = key.match(/^(\w+)_(\w+)$/);
|
|
88
118
|
if (specialFilter) {
|
|
89
119
|
const [, actualKey, filter] = specialFilter;
|
package/src/schema/generate.ts
CHANGED
|
@@ -95,6 +95,20 @@ export const generateDefinitions = ({
|
|
|
95
95
|
type: `${relation.targetModel.name}Where`,
|
|
96
96
|
},
|
|
97
97
|
]),
|
|
98
|
+
{
|
|
99
|
+
name: 'NOT',
|
|
100
|
+
type: `${model.name}Where`,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'AND',
|
|
104
|
+
type: `${model.name}Where`,
|
|
105
|
+
list: true,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'OR',
|
|
109
|
+
type: `${model.name}Where`,
|
|
110
|
+
list: true,
|
|
111
|
+
},
|
|
98
112
|
]),
|
|
99
113
|
input(
|
|
100
114
|
`${model.name}WhereUnique`,
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`query AND works 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"manyObjects": [
|
|
6
|
+
{
|
|
7
|
+
"id": "fc4e013e-4cb0-4ef8-9f2e-3d475bdf2b90",
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
exports[`query NOT works 1`] = `
|
|
14
|
+
{
|
|
15
|
+
"manyObjects": [
|
|
16
|
+
{
|
|
17
|
+
"id": "fc4e013e-4cb0-4ef8-9f2e-3d475bdf2b90",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "37a23870-e7f5-45c8-86e5-f14d9f2405f9",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
exports[`query OR works 1`] = `
|
|
27
|
+
{
|
|
28
|
+
"manyObjects": [
|
|
29
|
+
{
|
|
30
|
+
"id": "fc4e013e-4cb0-4ef8-9f2e-3d475bdf2b90",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "604ab55d-ec3e-4857-9f27-219158f80e64",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
|
|
3
39
|
exports[`query can be executed 1`] = `
|
|
4
40
|
{
|
|
5
41
|
"manyObjects": [
|
package/tests/api/query.spec.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { gql } from '../../src';
|
|
2
|
-
import { ANOTHER_ID, SOME_ID } from '../utils/database/seed';
|
|
2
|
+
import { ANOTHER_ID, SOME_ID, SOME_ID_2 } from '../utils/database/seed';
|
|
3
3
|
import { withServer } from '../utils/server';
|
|
4
4
|
|
|
5
5
|
describe('query', () => {
|
|
@@ -72,4 +72,46 @@ describe('query', () => {
|
|
|
72
72
|
).toMatchSnapshot();
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
it('NOT works', async () => {
|
|
77
|
+
await withServer(async (request) => {
|
|
78
|
+
expect(
|
|
79
|
+
await request(gql`
|
|
80
|
+
query NotQuery {
|
|
81
|
+
manyObjects(where: { NOT: { id: "${SOME_ID}" } }, orderBy: [{ xyz: DESC }]) {
|
|
82
|
+
id
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`)
|
|
86
|
+
).toMatchSnapshot();
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it('AND works', async () => {
|
|
91
|
+
await withServer(async (request) => {
|
|
92
|
+
expect(
|
|
93
|
+
await request(gql`
|
|
94
|
+
query AndQuery {
|
|
95
|
+
manyObjects(where: { xyz: 2, AND: [{ id: "${SOME_ID_2}" }] }, orderBy: [{ xyz: DESC }]) {
|
|
96
|
+
id
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`)
|
|
100
|
+
).toMatchSnapshot();
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it('OR works', async () => {
|
|
105
|
+
await withServer(async (request) => {
|
|
106
|
+
expect(
|
|
107
|
+
await request(gql`
|
|
108
|
+
query OrQuery {
|
|
109
|
+
manyObjects(where: { OR: [{ id: "${SOME_ID}" }, { id: "${SOME_ID_2}"}] }, orderBy: [{ xyz: DESC }]) {
|
|
110
|
+
id
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`)
|
|
114
|
+
).toMatchSnapshot();
|
|
115
|
+
});
|
|
116
|
+
});
|
|
75
117
|
});
|
|
@@ -54,6 +54,9 @@ export type AnotherObjectOrderBy = {
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
export type AnotherObjectWhere = {
|
|
57
|
+
AND?: InputMaybe<Array<AnotherObjectWhere>>;
|
|
58
|
+
NOT?: InputMaybe<AnotherObjectWhere>;
|
|
59
|
+
OR?: InputMaybe<Array<AnotherObjectWhere>>;
|
|
57
60
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
58
61
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
59
62
|
manyObjects_NONE?: InputMaybe<SomeObjectWhere>;
|
|
@@ -122,6 +125,9 @@ export type AnswerOrderBy = {
|
|
|
122
125
|
};
|
|
123
126
|
|
|
124
127
|
export type AnswerWhere = {
|
|
128
|
+
AND?: InputMaybe<Array<AnswerWhere>>;
|
|
129
|
+
NOT?: InputMaybe<AnswerWhere>;
|
|
130
|
+
OR?: InputMaybe<Array<AnswerWhere>>;
|
|
125
131
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
126
132
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
127
133
|
};
|
|
@@ -421,6 +427,9 @@ export type QuestionOrderBy = {
|
|
|
421
427
|
};
|
|
422
428
|
|
|
423
429
|
export type QuestionWhere = {
|
|
430
|
+
AND?: InputMaybe<Array<QuestionWhere>>;
|
|
431
|
+
NOT?: InputMaybe<QuestionWhere>;
|
|
432
|
+
OR?: InputMaybe<Array<QuestionWhere>>;
|
|
424
433
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
425
434
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
426
435
|
};
|
|
@@ -492,6 +501,9 @@ export enum ReactionType {
|
|
|
492
501
|
}
|
|
493
502
|
|
|
494
503
|
export type ReactionWhere = {
|
|
504
|
+
AND?: InputMaybe<Array<ReactionWhere>>;
|
|
505
|
+
NOT?: InputMaybe<ReactionWhere>;
|
|
506
|
+
OR?: InputMaybe<Array<ReactionWhere>>;
|
|
495
507
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
496
508
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
497
509
|
};
|
|
@@ -559,6 +571,9 @@ export type ReviewOrderBy = {
|
|
|
559
571
|
};
|
|
560
572
|
|
|
561
573
|
export type ReviewWhere = {
|
|
574
|
+
AND?: InputMaybe<Array<ReviewWhere>>;
|
|
575
|
+
NOT?: InputMaybe<ReviewWhere>;
|
|
576
|
+
OR?: InputMaybe<Array<ReviewWhere>>;
|
|
562
577
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
563
578
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
564
579
|
rating_GT?: InputMaybe<Scalars['Float']['input']>;
|
|
@@ -612,10 +627,14 @@ export type SomeObjectOrderBy = {
|
|
|
612
627
|
};
|
|
613
628
|
|
|
614
629
|
export type SomeObjectWhere = {
|
|
630
|
+
AND?: InputMaybe<Array<SomeObjectWhere>>;
|
|
631
|
+
NOT?: InputMaybe<SomeObjectWhere>;
|
|
632
|
+
OR?: InputMaybe<Array<SomeObjectWhere>>;
|
|
615
633
|
another?: InputMaybe<AnotherObjectWhere>;
|
|
616
634
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
617
635
|
float?: InputMaybe<Array<Scalars['Float']['input']>>;
|
|
618
636
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
637
|
+
xyz?: InputMaybe<Array<Scalars['Int']['input']>>;
|
|
619
638
|
};
|
|
620
639
|
|
|
621
640
|
export type SomeObjectWhereUnique = {
|
|
@@ -800,6 +819,9 @@ export type UserUpdatedReviewsArgs = {
|
|
|
800
819
|
};
|
|
801
820
|
|
|
802
821
|
export type UserWhere = {
|
|
822
|
+
AND?: InputMaybe<Array<UserWhere>>;
|
|
823
|
+
NOT?: InputMaybe<UserWhere>;
|
|
824
|
+
OR?: InputMaybe<Array<UserWhere>>;
|
|
803
825
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
804
826
|
};
|
|
805
827
|
|
|
@@ -51,6 +51,9 @@ export type AnotherObjectOrderBy = {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export type AnotherObjectWhere = {
|
|
54
|
+
AND?: InputMaybe<Array<AnotherObjectWhere>>;
|
|
55
|
+
NOT?: InputMaybe<AnotherObjectWhere>;
|
|
56
|
+
OR?: InputMaybe<Array<AnotherObjectWhere>>;
|
|
54
57
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
55
58
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
56
59
|
manyObjects_NONE?: InputMaybe<SomeObjectWhere>;
|
|
@@ -119,6 +122,9 @@ export type AnswerOrderBy = {
|
|
|
119
122
|
};
|
|
120
123
|
|
|
121
124
|
export type AnswerWhere = {
|
|
125
|
+
AND?: InputMaybe<Array<AnswerWhere>>;
|
|
126
|
+
NOT?: InputMaybe<AnswerWhere>;
|
|
127
|
+
OR?: InputMaybe<Array<AnswerWhere>>;
|
|
122
128
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
123
129
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
124
130
|
};
|
|
@@ -418,6 +424,9 @@ export type QuestionOrderBy = {
|
|
|
418
424
|
};
|
|
419
425
|
|
|
420
426
|
export type QuestionWhere = {
|
|
427
|
+
AND?: InputMaybe<Array<QuestionWhere>>;
|
|
428
|
+
NOT?: InputMaybe<QuestionWhere>;
|
|
429
|
+
OR?: InputMaybe<Array<QuestionWhere>>;
|
|
421
430
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
422
431
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
423
432
|
};
|
|
@@ -489,6 +498,9 @@ export enum ReactionType {
|
|
|
489
498
|
}
|
|
490
499
|
|
|
491
500
|
export type ReactionWhere = {
|
|
501
|
+
AND?: InputMaybe<Array<ReactionWhere>>;
|
|
502
|
+
NOT?: InputMaybe<ReactionWhere>;
|
|
503
|
+
OR?: InputMaybe<Array<ReactionWhere>>;
|
|
492
504
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
493
505
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
494
506
|
};
|
|
@@ -556,6 +568,9 @@ export type ReviewOrderBy = {
|
|
|
556
568
|
};
|
|
557
569
|
|
|
558
570
|
export type ReviewWhere = {
|
|
571
|
+
AND?: InputMaybe<Array<ReviewWhere>>;
|
|
572
|
+
NOT?: InputMaybe<ReviewWhere>;
|
|
573
|
+
OR?: InputMaybe<Array<ReviewWhere>>;
|
|
559
574
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
560
575
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
561
576
|
rating_GT?: InputMaybe<Scalars['Float']['input']>;
|
|
@@ -609,10 +624,14 @@ export type SomeObjectOrderBy = {
|
|
|
609
624
|
};
|
|
610
625
|
|
|
611
626
|
export type SomeObjectWhere = {
|
|
627
|
+
AND?: InputMaybe<Array<SomeObjectWhere>>;
|
|
628
|
+
NOT?: InputMaybe<SomeObjectWhere>;
|
|
629
|
+
OR?: InputMaybe<Array<SomeObjectWhere>>;
|
|
612
630
|
another?: InputMaybe<AnotherObjectWhere>;
|
|
613
631
|
deleted?: InputMaybe<Array<Scalars['Boolean']['input']>>;
|
|
614
632
|
float?: InputMaybe<Array<Scalars['Float']['input']>>;
|
|
615
633
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
634
|
+
xyz?: InputMaybe<Array<Scalars['Int']['input']>>;
|
|
616
635
|
};
|
|
617
636
|
|
|
618
637
|
export type SomeObjectWhereUnique = {
|
|
@@ -797,6 +816,9 @@ export type UserupdatedReviewsArgs = {
|
|
|
797
816
|
};
|
|
798
817
|
|
|
799
818
|
export type UserWhere = {
|
|
819
|
+
AND?: InputMaybe<Array<UserWhere>>;
|
|
820
|
+
NOT?: InputMaybe<UserWhere>;
|
|
821
|
+
OR?: InputMaybe<Array<UserWhere>>;
|
|
800
822
|
id?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
801
823
|
};
|
|
802
824
|
|
|
@@ -859,6 +881,21 @@ export type ReverseFiltersQueryQueryVariables = Exact<{ [key: string]: never; }>
|
|
|
859
881
|
|
|
860
882
|
export type ReverseFiltersQueryQuery = { all: Array<{ __typename: 'AnotherObject', id: string, manyObjects: Array<{ __typename: 'SomeObject', float: number }> }>, withFloat0: Array<{ __typename: 'AnotherObject', id: string, manyObjects: Array<{ __typename: 'SomeObject', float: number }> }>, withFloat0_5: Array<{ __typename: 'AnotherObject', id: string, manyObjects: Array<{ __typename: 'SomeObject', float: number }> }>, noneFloat0: Array<{ __typename: 'AnotherObject', id: string, manyObjects: Array<{ __typename: 'SomeObject', float: number }> }>, noneFloat0_5: Array<{ __typename: 'AnotherObject', id: string, manyObjects: Array<{ __typename: 'SomeObject', float: number }> }>, noneFloat2: Array<{ __typename: 'AnotherObject', id: string, manyObjects: Array<{ __typename: 'SomeObject', float: number }> }> };
|
|
861
883
|
|
|
884
|
+
export type NotQueryQueryVariables = Exact<{ [key: string]: never; }>;
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
export type NotQueryQuery = { manyObjects: Array<{ __typename: 'SomeObject', id: string }> };
|
|
888
|
+
|
|
889
|
+
export type AndQueryQueryVariables = Exact<{ [key: string]: never; }>;
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
export type AndQueryQuery = { manyObjects: Array<{ __typename: 'SomeObject', id: string }> };
|
|
893
|
+
|
|
894
|
+
export type OrQueryQueryVariables = Exact<{ [key: string]: never; }>;
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
export type OrQueryQuery = { manyObjects: Array<{ __typename: 'SomeObject', id: string }> };
|
|
898
|
+
|
|
862
899
|
export type DeleteAnotherObjectMutationMutationVariables = Exact<{
|
|
863
900
|
id: Scalars['ID']['input'];
|
|
864
901
|
}>;
|
|
@@ -1065,6 +1102,24 @@ export namespace ReverseFiltersQuery {
|
|
|
1065
1102
|
export type _____manyObjects = NonNullable<(NonNullable<NonNullable<(NonNullable<ReverseFiltersQueryQuery['noneFloat2']>)[number]>['manyObjects']>)[number]>;
|
|
1066
1103
|
}
|
|
1067
1104
|
|
|
1105
|
+
export namespace NotQuery {
|
|
1106
|
+
export type Variables = NotQueryQueryVariables;
|
|
1107
|
+
export type query = NotQueryQuery;
|
|
1108
|
+
export type manyObjects = NonNullable<(NonNullable<NotQueryQuery['manyObjects']>)[number]>;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
export namespace AndQuery {
|
|
1112
|
+
export type Variables = AndQueryQueryVariables;
|
|
1113
|
+
export type query = AndQueryQuery;
|
|
1114
|
+
export type manyObjects = NonNullable<(NonNullable<AndQueryQuery['manyObjects']>)[number]>;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
export namespace OrQuery {
|
|
1118
|
+
export type Variables = OrQueryQueryVariables;
|
|
1119
|
+
export type query = OrQueryQuery;
|
|
1120
|
+
export type manyObjects = NonNullable<(NonNullable<OrQueryQuery['manyObjects']>)[number]>;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1068
1123
|
export namespace DeleteAnotherObjectMutation {
|
|
1069
1124
|
export type Variables = DeleteAnotherObjectMutationMutationVariables;
|
|
1070
1125
|
export type mutation = DeleteAnotherObjectMutationMutation;
|
|
@@ -44,7 +44,7 @@ export type AnotherObjectInitializer = {
|
|
|
44
44
|
'name'?: string | null;
|
|
45
45
|
'myselfId'?: string | null;
|
|
46
46
|
'deleted'?: boolean;
|
|
47
|
-
'deletedAt'?: DateTime | null;
|
|
47
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
48
48
|
'deletedById'?: string | null;
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -53,7 +53,7 @@ export type AnotherObjectMutator = {
|
|
|
53
53
|
'name'?: string | null;
|
|
54
54
|
'myselfId'?: string | null;
|
|
55
55
|
'deleted'?: boolean;
|
|
56
|
-
'deletedAt'?: DateTime | null;
|
|
56
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
57
57
|
'deletedById'?: string | null;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -62,7 +62,7 @@ export type AnotherObjectSeed = {
|
|
|
62
62
|
'name'?: string | null;
|
|
63
63
|
'myselfId'?: string | null;
|
|
64
64
|
'deleted'?: boolean;
|
|
65
|
-
'deletedAt'?: DateTime | null;
|
|
65
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
66
66
|
'deletedById'?: string | null;
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -89,12 +89,12 @@ export type SomeObjectInitializer = {
|
|
|
89
89
|
'float': number;
|
|
90
90
|
'list': SomeEnum[] | string;
|
|
91
91
|
'xyz': number;
|
|
92
|
-
'createdAt': DateTime;
|
|
92
|
+
'createdAt': (DateTime | string);
|
|
93
93
|
'createdById': string;
|
|
94
|
-
'updatedAt': DateTime;
|
|
94
|
+
'updatedAt': (DateTime | string);
|
|
95
95
|
'updatedById': string;
|
|
96
96
|
'deleted'?: boolean;
|
|
97
|
-
'deletedAt'?: DateTime | null;
|
|
97
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
98
98
|
'deletedById'?: string | null;
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -105,12 +105,12 @@ export type SomeObjectMutator = {
|
|
|
105
105
|
'float'?: number;
|
|
106
106
|
'list'?: SomeEnum[] | string;
|
|
107
107
|
'xyz'?: number;
|
|
108
|
-
'createdAt'?: DateTime;
|
|
108
|
+
'createdAt'?: (DateTime | string);
|
|
109
109
|
'createdById'?: string;
|
|
110
|
-
'updatedAt'?: DateTime;
|
|
110
|
+
'updatedAt'?: (DateTime | string);
|
|
111
111
|
'updatedById'?: string;
|
|
112
112
|
'deleted'?: boolean;
|
|
113
|
-
'deletedAt'?: DateTime | null;
|
|
113
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
114
114
|
'deletedById'?: string | null;
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -121,12 +121,12 @@ export type SomeObjectSeed = {
|
|
|
121
121
|
'float': number;
|
|
122
122
|
'list': string[] | string;
|
|
123
123
|
'xyz': number;
|
|
124
|
-
'createdAt'?: DateTime;
|
|
124
|
+
'createdAt'?: (DateTime | string);
|
|
125
125
|
'createdById'?: string;
|
|
126
|
-
'updatedAt'?: DateTime;
|
|
126
|
+
'updatedAt'?: (DateTime | string);
|
|
127
127
|
'updatedById'?: string;
|
|
128
128
|
'deleted'?: boolean;
|
|
129
|
-
'deletedAt'?: DateTime | null;
|
|
129
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
130
130
|
'deletedById'?: string | null;
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -149,12 +149,12 @@ export type ReactionInitializer = {
|
|
|
149
149
|
'type': ReactionType;
|
|
150
150
|
'parentId'?: string | null;
|
|
151
151
|
'content'?: string | null;
|
|
152
|
-
'createdAt': DateTime;
|
|
152
|
+
'createdAt': (DateTime | string);
|
|
153
153
|
'createdById': string;
|
|
154
|
-
'updatedAt': DateTime;
|
|
154
|
+
'updatedAt': (DateTime | string);
|
|
155
155
|
'updatedById': string;
|
|
156
156
|
'deleted'?: boolean;
|
|
157
|
-
'deletedAt'?: DateTime | null;
|
|
157
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
158
158
|
'deletedById'?: string | null;
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -163,12 +163,12 @@ export type ReactionMutator = {
|
|
|
163
163
|
'type'?: ReactionType;
|
|
164
164
|
'parentId'?: string | null;
|
|
165
165
|
'content'?: string | null;
|
|
166
|
-
'createdAt'?: DateTime;
|
|
166
|
+
'createdAt'?: (DateTime | string);
|
|
167
167
|
'createdById'?: string;
|
|
168
|
-
'updatedAt'?: DateTime;
|
|
168
|
+
'updatedAt'?: (DateTime | string);
|
|
169
169
|
'updatedById'?: string;
|
|
170
170
|
'deleted'?: boolean;
|
|
171
|
-
'deletedAt'?: DateTime | null;
|
|
171
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
172
172
|
'deletedById'?: string | null;
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -201,12 +201,12 @@ export type ReviewSeed = {
|
|
|
201
201
|
'id': string;
|
|
202
202
|
'parentId'?: string | null;
|
|
203
203
|
'content'?: string | null;
|
|
204
|
-
'createdAt'?: DateTime;
|
|
204
|
+
'createdAt'?: (DateTime | string);
|
|
205
205
|
'createdById'?: string;
|
|
206
|
-
'updatedAt'?: DateTime;
|
|
206
|
+
'updatedAt'?: (DateTime | string);
|
|
207
207
|
'updatedById'?: string;
|
|
208
208
|
'deleted'?: boolean;
|
|
209
|
-
'deletedAt'?: DateTime | null;
|
|
209
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
210
210
|
'deletedById'?: string | null;
|
|
211
211
|
'rating'?: number | null;
|
|
212
212
|
}
|
|
@@ -237,12 +237,12 @@ export type QuestionSeed = {
|
|
|
237
237
|
'id': string;
|
|
238
238
|
'parentId'?: string | null;
|
|
239
239
|
'content'?: string | null;
|
|
240
|
-
'createdAt'?: DateTime;
|
|
240
|
+
'createdAt'?: (DateTime | string);
|
|
241
241
|
'createdById'?: string;
|
|
242
|
-
'updatedAt'?: DateTime;
|
|
242
|
+
'updatedAt'?: (DateTime | string);
|
|
243
243
|
'updatedById'?: string;
|
|
244
244
|
'deleted'?: boolean;
|
|
245
|
-
'deletedAt'?: DateTime | null;
|
|
245
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
246
246
|
'deletedById'?: string | null;
|
|
247
247
|
}
|
|
248
248
|
|
|
@@ -272,12 +272,12 @@ export type AnswerSeed = {
|
|
|
272
272
|
'id': string;
|
|
273
273
|
'parentId'?: string | null;
|
|
274
274
|
'content'?: string | null;
|
|
275
|
-
'createdAt'?: DateTime;
|
|
275
|
+
'createdAt'?: (DateTime | string);
|
|
276
276
|
'createdById'?: string;
|
|
277
|
-
'updatedAt'?: DateTime;
|
|
277
|
+
'updatedAt'?: (DateTime | string);
|
|
278
278
|
'updatedById'?: string;
|
|
279
279
|
'deleted'?: boolean;
|
|
280
|
-
'deletedAt'?: DateTime | null;
|
|
280
|
+
'deletedAt'?: (DateTime | string) | null;
|
|
281
281
|
'deletedById'?: string | null;
|
|
282
282
|
}
|
|
283
283
|
|