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