Skip to content

Commit 028064c

Browse files
Implement junction filters
1 parent a8f85e7 commit 028064c

12 files changed

Lines changed: 486 additions & 2 deletions

__tests__/integration/schema/__snapshots__/b.test.js.snap

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ type Bar implements Node {
1616
"""Only read the first \`n\` values of the set."""
1717
first: Int
1818
19+
"""
20+
A condition to be used in determining which values should be returned by the collection.
21+
"""
22+
junctionCondition: BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition
23+
1924
"""Only read the last \`n\` values of the set."""
2025
last: Int
2126
@@ -59,6 +64,14 @@ type Bar implements Node {
5964
nodeId: ID!
6065
}
6166
67+
"""
68+
A condition to be used against \`Foo\` object types. All fields are tested for equality and combined with a logical ‘and.’
69+
"""
70+
input BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition {
71+
"""Checks for equality with the \`Junction\` object’s \`createdAt\` field."""
72+
createdAt: Datetime
73+
}
74+
6275
"""A connection to a list of \`Foo\` values, with data from \`Junction\`."""
6376
type BarFoosByJunctionJBarIdAndJFooIdManyToManyConnection {
6477
"""
@@ -142,6 +155,11 @@ type Foo implements Node {
142155
"""Read all values in the set before (above) this cursor."""
143156
before: Cursor
144157
158+
"""
159+
A condition to be used in determining which values should be returned by the collection.
160+
"""
161+
condition: FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition
162+
145163
"""Only read the first \`n\` values of the set."""
146164
first: Int
147165
@@ -190,6 +208,17 @@ type Foo implements Node {
190208
nodeId: ID!
191209
}
192210
211+
"""
212+
A condition to be used against \`Bar\` object types. All fields are tested for equality and combined with a logical ‘and.’
213+
"""
214+
input FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition {
215+
"""Checks for equality with the \`Bar\` object’s \`barName\` field."""
216+
barName: String
217+
218+
"""Checks for equality with the \`Junction\` object’s \`createdAt\` field."""
219+
createdAt: Datetime
220+
}
221+
193222
"""A connection to a list of \`Bar\` values, with data from \`Junction\`."""
194223
type FooBarsByJunctionJFooIdAndJBarIdManyToManyConnection {
195224
"""

__tests__/integration/schema/__snapshots__/c.test.js.snap

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ type Bar implements Node {
1616
"""Only read the first \`n\` values of the set."""
1717
first: Int
1818
19+
"""
20+
A condition to be used in determining which values should be returned by the collection.
21+
"""
22+
junctionCondition: BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition
23+
1924
"""Only read the last \`n\` values of the set."""
2025
last: Int
2126
@@ -59,6 +64,14 @@ type Bar implements Node {
5964
nodeId: ID!
6065
}
6166
67+
"""
68+
A condition to be used against \`Foo\` object types. All fields are tested for equality and combined with a logical ‘and.’
69+
"""
70+
input BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition {
71+
"""Checks for equality with the \`Junction\` object’s \`id\` field."""
72+
id: Int
73+
}
74+
6275
"""A connection to a list of \`Foo\` values, with data from \`Junction\`."""
6376
type BarFoosByJunctionJBarIdAndJFooIdManyToManyConnection {
6477
"""
@@ -161,6 +174,11 @@ type Foo implements Node {
161174
"""Only read the first \`n\` values of the set."""
162175
first: Int
163176
177+
"""
178+
A condition to be used in determining which values should be returned by the collection.
179+
"""
180+
junctionCondition: FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition
181+
164182
"""Only read the last \`n\` values of the set."""
165183
last: Int
166184
@@ -206,6 +224,14 @@ type Foo implements Node {
206224
nodeId: ID!
207225
}
208226
227+
"""
228+
A condition to be used against \`Bar\` object types. All fields are tested for equality and combined with a logical ‘and.’
229+
"""
230+
input FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition {
231+
"""Checks for equality with the \`Junction\` object’s \`id\` field."""
232+
id: Int
233+
}
234+
209235
"""A connection to a list of \`Bar\` values, with data from \`Junction\`."""
210236
type FooBarsByJunctionJFooIdAndJBarIdManyToManyConnection {
211237
"""

__tests__/integration/schema/__snapshots__/d.test.js.snap

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ type Bar implements Node {
1616
"""Only read the first \`n\` values of the set."""
1717
first: Int
1818
19+
"""
20+
A condition to be used in determining which values should be returned by the collection.
21+
"""
22+
junctionCondition: BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition
23+
1924
"""Only read the last \`n\` values of the set."""
2025
last: Int
2126
@@ -59,6 +64,17 @@ type Bar implements Node {
5964
nodeId: ID!
6065
}
6166
67+
"""
68+
A condition to be used against \`Foo\` object types. All fields are tested for equality and combined with a logical ‘and.’
69+
"""
70+
input BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition {
71+
"""Checks for equality with the \`Junction\` object’s \`createdAt\` field."""
72+
createdAt: Datetime
73+
74+
"""Checks for equality with the \`Junction\` object’s \`id\` field."""
75+
id: Int
76+
}
77+
6278
"""A connection to a list of \`Foo\` values, with data from \`Junction\`."""
6379
type BarFoosByJunctionJBarIdAndJFooIdManyToManyConnection {
6480
"""
@@ -167,6 +183,11 @@ type Foo implements Node {
167183
"""Only read the first \`n\` values of the set."""
168184
first: Int
169185
186+
"""
187+
A condition to be used in determining which values should be returned by the collection.
188+
"""
189+
junctionCondition: FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition
190+
170191
"""Only read the last \`n\` values of the set."""
171192
last: Int
172193
@@ -212,6 +233,17 @@ type Foo implements Node {
212233
nodeId: ID!
213234
}
214235
236+
"""
237+
A condition to be used against \`Bar\` object types. All fields are tested for equality and combined with a logical ‘and.’
238+
"""
239+
input FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition {
240+
"""Checks for equality with the \`Junction\` object’s \`createdAt\` field."""
241+
createdAt: Datetime
242+
243+
"""Checks for equality with the \`Junction\` object’s \`id\` field."""
244+
id: Int
245+
}
246+
215247
"""A connection to a list of \`Bar\` values, with data from \`Junction\`."""
216248
type FooBarsByJunctionJFooIdAndJBarIdManyToManyConnection {
217249
"""

__tests__/integration/schema/__snapshots__/g.test.js.snap

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ type Post implements Node {
5050
"""Only read the first \`n\` values of the set."""
5151
first: Int
5252
53+
"""
54+
A condition to be used in determining which values should be returned by the collection.
55+
"""
56+
junctionCondition: PostAuthorsManyToManyCondition
57+
5358
"""Only read the last \`n\` values of the set."""
5459
last: Int
5560
@@ -135,6 +140,17 @@ type PostAuthorsEdge {
135140
node: PostAuthor
136141
}
137142
143+
"""
144+
A condition to be used against \`User\` object types. All fields are tested for equality and combined with a logical ‘and.’
145+
"""
146+
input PostAuthorsManyToManyCondition {
147+
"""Checks for equality with the \`PostAuthor\` object’s \`createdAt\` field."""
148+
createdAt: Datetime
149+
150+
"""Checks for equality with the \`PostAuthor\` object’s \`id\` field."""
151+
id: UUID
152+
}
153+
138154
"""A connection to a list of \`User\` values, with data from \`PostAuthor\`."""
139155
type PostAuthorsManyToManyConnection {
140156
"""
@@ -417,6 +433,11 @@ type User implements Node {
417433
"""Only read the first \`n\` values of the set."""
418434
first: Int
419435
436+
"""
437+
A condition to be used in determining which values should be returned by the collection.
438+
"""
439+
junctionCondition: UserPostsByPostAuthorUserIdAndPostIdManyToManyCondition
440+
420441
"""Only read the last \`n\` values of the set."""
421442
last: Int
422443
@@ -439,6 +460,17 @@ input UserCondition {
439460
id: UUID
440461
}
441462
463+
"""
464+
A condition to be used against \`Post\` object types. All fields are tested for equality and combined with a logical ‘and.’
465+
"""
466+
input UserPostsByPostAuthorUserIdAndPostIdManyToManyCondition {
467+
"""Checks for equality with the \`PostAuthor\` object’s \`createdAt\` field."""
468+
createdAt: Datetime
469+
470+
"""Checks for equality with the \`PostAuthor\` object’s \`id\` field."""
471+
id: UUID
472+
}
473+
442474
"""A connection to a list of \`Post\` values, with data from \`PostAuthor\`."""
443475
type UserPostsByPostAuthorUserIdAndPostIdManyToManyConnection {
444476
"""

__tests__/integration/schema/__snapshots__/p.simpleCollectionsBoth.test.js.snap

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,11 @@ type Person implements Node {
680680
"""Only read the first \`n\` values of the set."""
681681
first: Int
682682
683+
"""
684+
A condition to be used in determining which values should be returned by the collection.
685+
"""
686+
junctionCondition: PersonTeamsByMembershipPersonIdAndTeamIdManyToManyCondition
687+
683688
"""Only read the last \`n\` values of the set."""
684689
last: Int
685690
@@ -705,6 +710,14 @@ input PersonCondition {
705710
personName: String
706711
}
707712
713+
"""
714+
A condition to be used against \`Team\` object types. All fields are tested for equality and combined with a logical ‘and.’
715+
"""
716+
input PersonTeamsByMembershipPersonIdAndTeamIdManyToManyCondition {
717+
"""Checks for equality with the \`Membership\` object’s \`createdAt\` field."""
718+
createdAt: Datetime
719+
}
720+
708721
"""A connection to a list of \`Team\` values, with data from \`Membership\`."""
709722
type PersonTeamsByMembershipPersonIdAndTeamIdManyToManyConnection {
710723
"""
@@ -1169,6 +1182,11 @@ type Team implements Node {
11691182
"""Only read the first \`n\` values of the set."""
11701183
first: Int
11711184
1185+
"""
1186+
A condition to be used in determining which values should be returned by the collection.
1187+
"""
1188+
junctionCondition: TeamMembersManyToManyCondition
1189+
11721190
"""Only read the last \`n\` values of the set."""
11731191
last: Int
11741192
@@ -1246,6 +1264,14 @@ input TeamCondition {
12461264
teamName: String
12471265
}
12481266
1267+
"""
1268+
A condition to be used against \`Person\` object types. All fields are tested for equality and combined with a logical ‘and.’
1269+
"""
1270+
input TeamMembersManyToManyCondition {
1271+
"""Checks for equality with the \`Membership\` object’s \`createdAt\` field."""
1272+
createdAt: Datetime
1273+
}
1274+
12491275
"""
12501276
A connection to a list of \`Person\` values, with data from \`Membership\`.
12511277
"""

__tests__/integration/schema/__snapshots__/p.test.js.snap

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,11 @@ type Person implements Node {
578578
"""Only read the first \`n\` values of the set."""
579579
first: Int
580580
581+
"""
582+
A condition to be used in determining which values should be returned by the collection.
583+
"""
584+
junctionCondition: PersonTeamsByMembershipPersonIdAndTeamIdManyToManyCondition
585+
581586
"""Only read the last \`n\` values of the set."""
582587
last: Int
583588
@@ -603,6 +608,14 @@ input PersonCondition {
603608
personName: String
604609
}
605610
611+
"""
612+
A condition to be used against \`Team\` object types. All fields are tested for equality and combined with a logical ‘and.’
613+
"""
614+
input PersonTeamsByMembershipPersonIdAndTeamIdManyToManyCondition {
615+
"""Checks for equality with the \`Membership\` object’s \`createdAt\` field."""
616+
createdAt: Datetime
617+
}
618+
606619
"""A connection to a list of \`Team\` values, with data from \`Membership\`."""
607620
type PersonTeamsByMembershipPersonIdAndTeamIdManyToManyConnection {
608621
"""
@@ -965,6 +978,11 @@ type Team implements Node {
965978
"""Only read the first \`n\` values of the set."""
966979
first: Int
967980
981+
"""
982+
A condition to be used in determining which values should be returned by the collection.
983+
"""
984+
junctionCondition: TeamMembersManyToManyCondition
985+
968986
"""Only read the last \`n\` values of the set."""
969987
last: Int
970988
@@ -1025,6 +1043,14 @@ input TeamCondition {
10251043
teamName: String
10261044
}
10271045
1046+
"""
1047+
A condition to be used against \`Person\` object types. All fields are tested for equality and combined with a logical ‘and.’
1048+
"""
1049+
input TeamMembersManyToManyCondition {
1050+
"""Checks for equality with the \`Membership\` object’s \`createdAt\` field."""
1051+
createdAt: Datetime
1052+
}
1053+
10281054
"""
10291055
A connection to a list of \`Person\` values, with data from \`Membership\`.
10301056
"""

0 commit comments

Comments
 (0)