Skip to content

Commit

Permalink
Update schema with top level connections
Browse files Browse the repository at this point in the history
  • Loading branch information
angrykoala committed Mar 5, 2024
1 parent 1e679ad commit 1b57ee6
Show file tree
Hide file tree
Showing 46 changed files with 1,416 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/graphql/tests/schema/comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,11 @@ describe("Comments", () => {
Series: SeriesCreateInput
}
type ProductionEdge {
cursor: String!
node: Production!
}
enum ProductionImplementation {
Movie
Series
Expand Down Expand Up @@ -1144,6 +1149,12 @@ describe("Comments", () => {
typename_IN: [ProductionImplementation!]
}
type ProductionsConnection {
edges: [ProductionEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type Query {
actors(options: ActorOptions, where: ActorWhere): [Actor!]!
actorsAggregate(where: ActorWhere): ActorAggregateSelection!
Expand All @@ -1153,6 +1164,7 @@ describe("Comments", () => {
moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection!
productions(options: ProductionOptions, where: ProductionWhere): [Production!]!
productionsAggregate(where: ProductionWhere): ProductionAggregateSelection!
productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection!
series(options: SeriesOptions, where: SeriesWhere): [Series!]!
seriesAggregate(where: SeriesWhere): SeriesAggregateSelection!
seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection!
Expand Down
24 changes: 24 additions & 0 deletions packages/graphql/tests/schema/connections/interfaces.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ describe("Connection with interfaces", () => {
movies: CreatureMoviesDisconnectFieldInput
}
type CreatureEdge {
cursor: String!
node: Creature!
}
enum CreatureImplementation {
Person
}
Expand Down Expand Up @@ -216,6 +221,12 @@ describe("Connection with interfaces", () => {
typename_IN: [CreatureImplementation!]
}
type CreaturesConnection {
edges: [CreatureEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
\\"\\"\\"
Information about the number of nodes and relationships deleted during a delete mutation
\\"\\"\\"
Expand Down Expand Up @@ -633,6 +644,11 @@ describe("Connection with interfaces", () => {
director: [ProductionDirectorDisconnectFieldInput!]
}
type ProductionEdge {
cursor: String!
node: Production!
}
enum ProductionImplementation {
Movie
Series
Expand Down Expand Up @@ -694,9 +710,16 @@ describe("Connection with interfaces", () => {
typename_IN: [ProductionImplementation!]
}
type ProductionsConnection {
edges: [ProductionEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type Query {
creatures(options: CreatureOptions, where: CreatureWhere): [Creature!]!
creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection!
creaturesConnection(after: String, first: Int, sort: [CreatureSort], where: CreatureWhere): CreaturesConnection!
movies(options: MovieOptions, where: MovieWhere): [Movie!]!
moviesAggregate(where: MovieWhere): MovieAggregateSelection!
moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection!
Expand All @@ -705,6 +728,7 @@ describe("Connection with interfaces", () => {
peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection!
productions(options: ProductionOptions, where: ProductionWhere): [Production!]!
productionsAggregate(where: ProductionWhere): ProductionAggregateSelection!
productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection!
series(options: SeriesOptions, where: SeriesWhere): [Series!]!
seriesAggregate(where: SeriesWhere): SeriesAggregateSelection!
seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection!
Expand Down
36 changes: 36 additions & 0 deletions packages/graphql/tests/schema/directive-preserve.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,11 @@ describe("Directive-preserve", () => {
actors: [ProductionActorsDisconnectFieldInput!]
}
type ProductionEdge {
cursor: String!
node: Production!
}
enum ProductionImplementation {
Movie
Series
Expand Down Expand Up @@ -1740,6 +1745,12 @@ describe("Directive-preserve", () => {
typename_IN: [ProductionImplementation!]
}
type ProductionsConnection {
edges: [ProductionEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type Query {
actors(options: ActorOptions, where: ActorWhere): [Actor!]!
actorsAggregate(where: ActorWhere): ActorAggregateSelection!
Expand All @@ -1749,6 +1760,7 @@ describe("Directive-preserve", () => {
moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection!
productions(options: ProductionOptions, where: ProductionWhere): [Production!]!
productionsAggregate(where: ProductionWhere): ProductionAggregateSelection!
productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection!
series(options: SeriesOptions, where: SeriesWhere): [Series!]!
seriesAggregate(where: SeriesWhere): SeriesAggregateSelection!
seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection!
Expand Down Expand Up @@ -2674,6 +2686,11 @@ describe("Directive-preserve", () => {
Series: SeriesCreateInput
}
type ProductionEdge {
cursor: String!
node: Production!
}
enum ProductionImplementation {
Movie
Series
Expand Down Expand Up @@ -2716,6 +2733,12 @@ describe("Directive-preserve", () => {
typename_IN: [ProductionImplementation!]
}
type ProductionsConnection {
edges: [ProductionEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type Query {
actors(options: ActorOptions, where: ActorWhere): [Actor!]!
actorsAggregate(where: ActorWhere): ActorAggregateSelection!
Expand All @@ -2725,6 +2748,7 @@ describe("Directive-preserve", () => {
moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection!
productions(options: ProductionOptions, where: ProductionWhere): [Production!]!
productionsAggregate(where: ProductionWhere): ProductionAggregateSelection!
productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection!
series(options: SeriesOptions, where: SeriesWhere): [Series!]!
seriesAggregate(where: SeriesWhere): SeriesAggregateSelection!
seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection!
Expand Down Expand Up @@ -3675,6 +3699,11 @@ describe("Directive-preserve", () => {
Series: SeriesCreateInput
}
type ProductionEdge {
cursor: String!
node: Production!
}
enum ProductionImplementation {
Movie
Series
Expand Down Expand Up @@ -3717,6 +3746,12 @@ describe("Directive-preserve", () => {
typename_IN: [ProductionImplementation!]
}
type ProductionsConnection {
edges: [ProductionEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type Query {
actors(options: ActorOptions, where: ActorWhere): [Actor!]!
actorsAggregate(where: ActorWhere): ActorAggregateSelection!
Expand All @@ -3726,6 +3761,7 @@ describe("Directive-preserve", () => {
moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection!
productions(options: ProductionOptions, where: ProductionWhere): [Production!]!
productionsAggregate(where: ProductionWhere): ProductionAggregateSelection!
productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection!
series(options: SeriesOptions, where: SeriesWhere): [Series!]!
seriesAggregate(where: SeriesWhere): SeriesAggregateSelection!
seriesConnection(after: String, first: Int, sort: [SeriesSort], where: SeriesWhere): SeriesConnection!
Expand Down
12 changes: 12 additions & 0 deletions packages/graphql/tests/schema/directives/customResolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ describe("@customResolver directive", () => {
type Query {
userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]!
userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection!
userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection!
users(options: UserOptions, where: UserWhere): [User!]!
usersAggregate(where: UserWhere): UserAggregateSelection!
usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection!
Expand Down Expand Up @@ -168,6 +169,11 @@ describe("@customResolver directive", () => {
customResolver: StringAggregateSelection!
}
type UserInterfaceEdge {
cursor: String!
node: UserInterface!
}
enum UserInterfaceImplementation {
User
}
Expand Down Expand Up @@ -205,6 +211,12 @@ describe("@customResolver directive", () => {
typename_IN: [UserInterfaceImplementation!]
}
type UserInterfacesConnection {
edges: [UserInterfaceEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
input UserOptions {
limit: Int
offset: Int
Expand Down
12 changes: 12 additions & 0 deletions packages/graphql/tests/schema/directives/default.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ describe("@default directive", () => {
type Query {
userInterfaces(options: UserInterfaceOptions, where: UserInterfaceWhere): [UserInterface!]!
userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection!
userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort], where: UserInterfaceWhere): UserInterfacesConnection!
users(options: UserOptions, where: UserWhere): [User!]!
usersAggregate(where: UserWhere): UserAggregateSelection!
usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection!
Expand Down Expand Up @@ -215,6 +216,11 @@ describe("@default directive", () => {
toBeOverridden: StringAggregateSelection!
}
type UserInterfaceEdge {
cursor: String!
node: UserInterface!
}
enum UserInterfaceImplementation {
User
}
Expand Down Expand Up @@ -263,6 +269,12 @@ describe("@default directive", () => {
typename_IN: [UserInterfaceImplementation!]
}
type UserInterfacesConnection {
edges: [UserInterfaceEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
input UserOptions {
limit: Int
offset: Int
Expand Down
36 changes: 36 additions & 0 deletions packages/graphql/tests/schema/directives/filterable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7290,6 +7290,12 @@ describe("@filterable directive", () => {
startCursor: String
}

type PeopleConnection {
edges: [PersonEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}

interface Person {
username: String!
}
Expand All @@ -7307,6 +7313,11 @@ describe("@filterable directive", () => {
Actor: ActorCreateInput
}

type PersonEdge {
cursor: String!
node: Person!
}

interface PersonEventPayload {
username: String!
}
Expand Down Expand Up @@ -7378,6 +7389,7 @@ describe("@filterable directive", () => {
moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection!
people(options: PersonOptions, where: PersonWhere): [Person!]!
peopleAggregate(where: PersonWhere): PersonAggregateSelection!
peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection!
}

\\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\"
Expand Down Expand Up @@ -8122,6 +8134,12 @@ describe("@filterable directive", () => {
startCursor: String
}

type PeopleConnection {
edges: [PersonEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}

interface Person {
username: String!
}
Expand All @@ -8139,6 +8157,11 @@ describe("@filterable directive", () => {
Actor: ActorCreateInput
}

type PersonEdge {
cursor: String!
node: Person!
}

interface PersonEventPayload {
username: String!
}
Expand Down Expand Up @@ -8210,6 +8233,7 @@ describe("@filterable directive", () => {
moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection!
people(options: PersonOptions, where: PersonWhere): [Person!]!
peopleAggregate(where: PersonWhere): PersonAggregateSelection!
peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection!
}

\\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\"
Expand Down Expand Up @@ -8954,6 +8978,12 @@ describe("@filterable directive", () => {
startCursor: String
}

type PeopleConnection {
edges: [PersonEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}

interface Person {
username: String!
}
Expand All @@ -8971,6 +9001,11 @@ describe("@filterable directive", () => {
Actor: ActorCreateInput
}

type PersonEdge {
cursor: String!
node: Person!
}

interface PersonEventPayload {
username: String!
}
Expand Down Expand Up @@ -9042,6 +9077,7 @@ describe("@filterable directive", () => {
moviesConnection(after: String, first: Int, sort: [MovieSort], where: MovieWhere): MoviesConnection!
people(options: PersonOptions, where: PersonWhere): [Person!]!
peopleAggregate(where: PersonWhere): PersonAggregateSelection!
peopleConnection(after: String, first: Int, sort: [PersonSort], where: PersonWhere): PeopleConnection!
}

\\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\"
Expand Down
Loading

0 comments on commit 1b57ee6

Please sign in to comment.