Skip to content

Commit

Permalink
Implement junction filters
Browse files Browse the repository at this point in the history
  • Loading branch information
singingwolfboy committed Nov 27, 2019
1 parent a8f85e7 commit 028064c
Show file tree
Hide file tree
Showing 12 changed files with 486 additions and 2 deletions.
29 changes: 29 additions & 0 deletions __tests__/integration/schema/__snapshots__/b.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ type Bar implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand Down Expand Up @@ -59,6 +64,14 @@ type Bar implements Node {
nodeId: ID!
}
"""
A condition to be used against \`Foo\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition {
"""Checks for equality with the \`Junction\` object’s \`createdAt\` field."""
createdAt: Datetime
}
"""A connection to a list of \`Foo\` values, with data from \`Junction\`."""
type BarFoosByJunctionJBarIdAndJFooIdManyToManyConnection {
"""
Expand Down Expand Up @@ -142,6 +155,11 @@ type Foo implements Node {
"""Read all values in the set before (above) this cursor."""
before: Cursor
"""
A condition to be used in determining which values should be returned by the collection.
"""
condition: FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition
"""Only read the first \`n\` values of the set."""
first: Int
Expand Down Expand Up @@ -190,6 +208,17 @@ type Foo implements Node {
nodeId: ID!
}
"""
A condition to be used against \`Bar\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition {
"""Checks for equality with the \`Bar\` object’s \`barName\` field."""
barName: String
"""Checks for equality with the \`Junction\` object’s \`createdAt\` field."""
createdAt: Datetime
}
"""A connection to a list of \`Bar\` values, with data from \`Junction\`."""
type FooBarsByJunctionJFooIdAndJBarIdManyToManyConnection {
"""
Expand Down
26 changes: 26 additions & 0 deletions __tests__/integration/schema/__snapshots__/c.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ type Bar implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand Down Expand Up @@ -59,6 +64,14 @@ type Bar implements Node {
nodeId: ID!
}
"""
A condition to be used against \`Foo\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition {
"""Checks for equality with the \`Junction\` object’s \`id\` field."""
id: Int
}
"""A connection to a list of \`Foo\` values, with data from \`Junction\`."""
type BarFoosByJunctionJBarIdAndJFooIdManyToManyConnection {
"""
Expand Down Expand Up @@ -161,6 +174,11 @@ type Foo implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand Down Expand Up @@ -206,6 +224,14 @@ type Foo implements Node {
nodeId: ID!
}
"""
A condition to be used against \`Bar\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition {
"""Checks for equality with the \`Junction\` object’s \`id\` field."""
id: Int
}
"""A connection to a list of \`Bar\` values, with data from \`Junction\`."""
type FooBarsByJunctionJFooIdAndJBarIdManyToManyConnection {
"""
Expand Down
32 changes: 32 additions & 0 deletions __tests__/integration/schema/__snapshots__/d.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ type Bar implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand Down Expand Up @@ -59,6 +64,17 @@ type Bar implements Node {
nodeId: ID!
}
"""
A condition to be used against \`Foo\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input BarFoosByJunctionJBarIdAndJFooIdManyToManyCondition {
"""Checks for equality with the \`Junction\` object’s \`createdAt\` field."""
createdAt: Datetime
"""Checks for equality with the \`Junction\` object’s \`id\` field."""
id: Int
}
"""A connection to a list of \`Foo\` values, with data from \`Junction\`."""
type BarFoosByJunctionJBarIdAndJFooIdManyToManyConnection {
"""
Expand Down Expand Up @@ -167,6 +183,11 @@ type Foo implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand Down Expand Up @@ -212,6 +233,17 @@ type Foo implements Node {
nodeId: ID!
}
"""
A condition to be used against \`Bar\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input FooBarsByJunctionJFooIdAndJBarIdManyToManyCondition {
"""Checks for equality with the \`Junction\` object’s \`createdAt\` field."""
createdAt: Datetime
"""Checks for equality with the \`Junction\` object’s \`id\` field."""
id: Int
}
"""A connection to a list of \`Bar\` values, with data from \`Junction\`."""
type FooBarsByJunctionJFooIdAndJBarIdManyToManyConnection {
"""
Expand Down
32 changes: 32 additions & 0 deletions __tests__/integration/schema/__snapshots__/g.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ type Post implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: PostAuthorsManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand Down Expand Up @@ -135,6 +140,17 @@ type PostAuthorsEdge {
node: PostAuthor
}
"""
A condition to be used against \`User\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input PostAuthorsManyToManyCondition {
"""Checks for equality with the \`PostAuthor\` object’s \`createdAt\` field."""
createdAt: Datetime
"""Checks for equality with the \`PostAuthor\` object’s \`id\` field."""
id: UUID
}
"""A connection to a list of \`User\` values, with data from \`PostAuthor\`."""
type PostAuthorsManyToManyConnection {
"""
Expand Down Expand Up @@ -417,6 +433,11 @@ type User implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: UserPostsByPostAuthorUserIdAndPostIdManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand All @@ -439,6 +460,17 @@ input UserCondition {
id: UUID
}
"""
A condition to be used against \`Post\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input UserPostsByPostAuthorUserIdAndPostIdManyToManyCondition {
"""Checks for equality with the \`PostAuthor\` object’s \`createdAt\` field."""
createdAt: Datetime
"""Checks for equality with the \`PostAuthor\` object’s \`id\` field."""
id: UUID
}
"""A connection to a list of \`Post\` values, with data from \`PostAuthor\`."""
type UserPostsByPostAuthorUserIdAndPostIdManyToManyConnection {
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,11 @@ type Person implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: PersonTeamsByMembershipPersonIdAndTeamIdManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand All @@ -705,6 +710,14 @@ input PersonCondition {
personName: String
}
"""
A condition to be used against \`Team\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input PersonTeamsByMembershipPersonIdAndTeamIdManyToManyCondition {
"""Checks for equality with the \`Membership\` object’s \`createdAt\` field."""
createdAt: Datetime
}
"""A connection to a list of \`Team\` values, with data from \`Membership\`."""
type PersonTeamsByMembershipPersonIdAndTeamIdManyToManyConnection {
"""
Expand Down Expand Up @@ -1169,6 +1182,11 @@ type Team implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: TeamMembersManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand Down Expand Up @@ -1246,6 +1264,14 @@ input TeamCondition {
teamName: String
}
"""
A condition to be used against \`Person\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input TeamMembersManyToManyCondition {
"""Checks for equality with the \`Membership\` object’s \`createdAt\` field."""
createdAt: Datetime
}
"""
A connection to a list of \`Person\` values, with data from \`Membership\`.
"""
Expand Down
26 changes: 26 additions & 0 deletions __tests__/integration/schema/__snapshots__/p.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,11 @@ type Person implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: PersonTeamsByMembershipPersonIdAndTeamIdManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand All @@ -603,6 +608,14 @@ input PersonCondition {
personName: String
}
"""
A condition to be used against \`Team\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input PersonTeamsByMembershipPersonIdAndTeamIdManyToManyCondition {
"""Checks for equality with the \`Membership\` object’s \`createdAt\` field."""
createdAt: Datetime
}
"""A connection to a list of \`Team\` values, with data from \`Membership\`."""
type PersonTeamsByMembershipPersonIdAndTeamIdManyToManyConnection {
"""
Expand Down Expand Up @@ -965,6 +978,11 @@ type Team implements Node {
"""Only read the first \`n\` values of the set."""
first: Int
"""
A condition to be used in determining which values should be returned by the collection.
"""
junctionCondition: TeamMembersManyToManyCondition
"""Only read the last \`n\` values of the set."""
last: Int
Expand Down Expand Up @@ -1025,6 +1043,14 @@ input TeamCondition {
teamName: String
}
"""
A condition to be used against \`Person\` object types. All fields are tested for equality and combined with a logical ‘and.’
"""
input TeamMembersManyToManyCondition {
"""Checks for equality with the \`Membership\` object’s \`createdAt\` field."""
createdAt: Datetime
}
"""
A connection to a list of \`Person\` values, with data from \`Membership\`.
"""
Expand Down
Loading

0 comments on commit 028064c

Please sign in to comment.