Use pagination container

This commit is contained in:
Chi Vinh Le
2018-07-02 19:13:13 -03:00
parent 4494ac8900
commit 796d24db3d
11 changed files with 148 additions and 43 deletions
@@ -232,7 +232,10 @@ type PageInfo {
"""
Indicates that there are more nodes after this subset.
"""
hasNextPage: Boolean!
hasNextPage: Boolean
hasPreviousPage: Boolean
startCursor: Cursor
endCursor: Cursor
}
"""
+1
View File
@@ -280,6 +280,7 @@ async function retrieveConnection(
edges,
pageInfo: {
hasNextPage,
endCursor: (nodes.length && nodes[nodes.length - 1].created_at) || null,
},
};
+1
View File
@@ -7,6 +7,7 @@ export interface Edge<T> {
export interface PageInfo {
hasNextPage: boolean;
endCursor: Cursor;
}
export interface Connection<T> {