@@ -806,38 +806,56 @@ class Query(ObjectType):
806
806
807
807
assert str (schema ) == dedent (
808
808
"""\
809
- schema {
810
- query: Query
809
+ type Query {
810
+ pets(before: String = null, after: String = null, first: Int = null, last: Int = null, age: Int = null): PetTypeConnection
811
811
}
812
812
813
- interface Node {
814
- id: ID!
813
+ type PetTypeConnection {
814
+ \" ""Pagination data for this connection.\" ""
815
+ pageInfo: PageInfo!
816
+
817
+ \" ""Contains the nodes in this connection.\" ""
818
+ edges: [PetTypeEdge]!
815
819
}
816
820
821
+ \" ""
822
+ The Relay compliant `PageInfo` type, containing data necessary to paginate this connection.
823
+ \" ""
817
824
type PageInfo {
825
+ \" ""When paginating forwards, are there more items?\" ""
818
826
hasNextPage: Boolean!
827
+
828
+ \" ""When paginating backwards, are there more items?\" ""
819
829
hasPreviousPage: Boolean!
830
+
831
+ \" ""When paginating backwards, the cursor to continue.\" ""
820
832
startCursor: String
833
+
834
+ \" ""When paginating forwards, the cursor to continue.\" ""
821
835
endCursor: String
822
836
}
823
-
824
- type PetType implements Node {
825
- age: Int!
826
- id: ID!
827
- }
828
-
829
- type PetTypeConnection {
830
- pageInfo: PageInfo!
831
- edges: [PetTypeEdge]!
832
- }
833
-
837
+
838
+ \" ""A Relay edge containing a `PetType` and its cursor.\" ""
834
839
type PetTypeEdge {
840
+ \" ""The item at the end of the edge\" ""
835
841
node: PetType
842
+
843
+ \" ""A cursor for use in pagination\" ""
836
844
cursor: String!
837
845
}
838
-
839
- type Query {
840
- pets(before: String, after: String, first: Int, last: Int, age: Int): PetTypeConnection
846
+
847
+ type PetType implements Node {
848
+ \" ""\" ""
849
+ age: Int!
850
+
851
+ \" ""The ID of the object\" ""
852
+ id: ID!
853
+ }
854
+
855
+ \" ""An object with an ID\" ""
856
+ interface Node {
857
+ \" ""The ID of the object\" ""
858
+ id: ID!
841
859
}
842
860
"""
843
861
)
@@ -858,40 +876,58 @@ class Query(ObjectType):
858
876
859
877
assert str (schema ) == dedent (
860
878
"""\
861
- schema {
862
- query: Query
879
+ type Query {
880
+ 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
863
881
}
864
882
865
- interface Node {
866
- id: ID!
883
+ type PetTypeConnection {
884
+ \" ""Pagination data for this connection.\" ""
885
+ pageInfo: PageInfo!
886
+
887
+ \" ""Contains the nodes in this connection.\" ""
888
+ edges: [PetTypeEdge]!
867
889
}
868
890
891
+ \" ""
892
+ The Relay compliant `PageInfo` type, containing data necessary to paginate this connection.
893
+ \" ""
869
894
type PageInfo {
895
+ \" ""When paginating forwards, are there more items?\" ""
870
896
hasNextPage: Boolean!
897
+
898
+ \" ""When paginating backwards, are there more items?\" ""
871
899
hasPreviousPage: Boolean!
872
- startCursor: String
873
- endCursor: String
874
- }
875
900
876
- type PetType implements Node {
877
- age: Int!
878
- id: ID!
879
- }
901
+ \" ""When paginating backwards, the cursor to continue.\" ""
902
+ startCursor: String
880
903
881
- type PetTypeConnection {
882
- pageInfo: PageInfo!
883
- edges: [PetTypeEdge]!
904
+ \" ""When paginating forwards, the cursor to continue.\" ""
905
+ endCursor: String
884
906
}
885
907
908
+ \" ""A Relay edge containing a `PetType` and its cursor.\" ""
886
909
type PetTypeEdge {
910
+ \" ""The item at the end of the edge\" ""
887
911
node: PetType
912
+
913
+ \" ""A cursor for use in pagination\" ""
888
914
cursor: String!
889
915
}
890
916
891
- type Query {
892
- pets(before: String, after: String, first: Int, last: Int, age: Int, age_Isnull: Boolean, age_Lt: Int): PetTypeConnection
917
+ type PetType implements Node {
918
+ \" ""\" ""
919
+ age: Int!
920
+
921
+ \" ""The ID of the object\" ""
922
+ id: ID!
893
923
}
894
- """
924
+
925
+ \" ""An object with an ID\" ""
926
+ interface Node {
927
+ \" ""The ID of the object\" ""
928
+ id: ID!
929
+ }
930
+ """
895
931
)
896
932
897
933
0 commit comments