@@ -809,38 +809,56 @@ class Query(ObjectType):
809809
810810 assert str (schema ) == dedent (
811811 """\
812- schema {
813- query: Query
812+ type Query {
813+ pets(before: String = null, after: String = null, first: Int = null, last: Int = null, age: Int = null): PetTypeConnection
814814 }
815815
816- interface Node {
817- id: ID!
816+ type PetTypeConnection {
817+ \" ""Pagination data for this connection.\" ""
818+ pageInfo: PageInfo!
819+
820+ \" ""Contains the nodes in this connection.\" ""
821+ edges: [PetTypeEdge]!
818822 }
819823
824+ \" ""
825+ The Relay compliant `PageInfo` type, containing data necessary to paginate this connection.
826+ \" ""
820827 type PageInfo {
828+ \" ""When paginating forwards, are there more items?\" ""
821829 hasNextPage: Boolean!
830+
831+ \" ""When paginating backwards, are there more items?\" ""
822832 hasPreviousPage: Boolean!
833+
834+ \" ""When paginating backwards, the cursor to continue.\" ""
823835 startCursor: String
836+
837+ \" ""When paginating forwards, the cursor to continue.\" ""
824838 endCursor: String
825839 }
826-
827- type PetType implements Node {
828- age: Int!
829- id: ID!
830- }
831-
832- type PetTypeConnection {
833- pageInfo: PageInfo!
834- edges: [PetTypeEdge]!
835- }
836-
840+
841+ \" ""A Relay edge containing a `PetType` and its cursor.\" ""
837842 type PetTypeEdge {
843+ \" ""The item at the end of the edge\" ""
838844 node: PetType
845+
846+ \" ""A cursor for use in pagination\" ""
839847 cursor: String!
840848 }
841-
842- type Query {
843- pets(before: String, after: String, first: Int, last: Int, age: Int): PetTypeConnection
849+
850+ type PetType implements Node {
851+ \" ""\" ""
852+ age: Int!
853+
854+ \" ""The ID of the object\" ""
855+ id: ID!
856+ }
857+
858+ \" ""An object with an ID\" ""
859+ interface Node {
860+ \" ""The ID of the object\" ""
861+ id: ID!
844862 }
845863 """
846864 )
@@ -861,40 +879,58 @@ class Query(ObjectType):
861879
862880 assert str (schema ) == dedent (
863881 """\
864- schema {
865- query: Query
882+ type Query {
883+ pets(before: String = null, after: String = null, first: Int = null, last: Int = null, age: Int = null, age_Isnull: Boolean = null, age_Lt: Int = null): PetTypeConnection
866884 }
867885
868- interface Node {
869- id: ID!
886+ type PetTypeConnection {
887+ \" ""Pagination data for this connection.\" ""
888+ pageInfo: PageInfo!
889+
890+ \" ""Contains the nodes in this connection.\" ""
891+ edges: [PetTypeEdge]!
870892 }
871893
894+ \" ""
895+ The Relay compliant `PageInfo` type, containing data necessary to paginate this connection.
896+ \" ""
872897 type PageInfo {
898+ \" ""When paginating forwards, are there more items?\" ""
873899 hasNextPage: Boolean!
900+
901+ \" ""When paginating backwards, are there more items?\" ""
874902 hasPreviousPage: Boolean!
875- startCursor: String
876- endCursor: String
877- }
878903
879- type PetType implements Node {
880- age: Int!
881- id: ID!
882- }
904+ \" ""When paginating backwards, the cursor to continue.\" ""
905+ startCursor: String
883906
884- type PetTypeConnection {
885- pageInfo: PageInfo!
886- edges: [PetTypeEdge]!
907+ \" ""When paginating forwards, the cursor to continue.\" ""
908+ endCursor: String
887909 }
888910
911+ \" ""A Relay edge containing a `PetType` and its cursor.\" ""
889912 type PetTypeEdge {
913+ \" ""The item at the end of the edge\" ""
890914 node: PetType
915+
916+ \" ""A cursor for use in pagination\" ""
891917 cursor: String!
892918 }
893919
894- type Query {
895- pets(before: String, after: String, first: Int, last: Int, age: Int, age_Isnull: Boolean, age_Lt: Int): PetTypeConnection
920+ type PetType implements Node {
921+ \" ""\" ""
922+ age: Int!
923+
924+ \" ""The ID of the object\" ""
925+ id: ID!
896926 }
897- """
927+
928+ \" ""An object with an ID\" ""
929+ interface Node {
930+ \" ""The ID of the object\" ""
931+ id: ID!
932+ }
933+ """
898934 )
899935
900936
0 commit comments