mirror of
https://github.com/wassname/talk.git
synced 2026-08-15 12:55:10 +08:00
Use pagination container
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
@@ -280,6 +280,7 @@ async function retrieveConnection(
|
||||
edges,
|
||||
pageInfo: {
|
||||
hasNextPage,
|
||||
endCursor: (nodes.length && nodes[nodes.length - 1].created_at) || null,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ export interface Edge<T> {
|
||||
|
||||
export interface PageInfo {
|
||||
hasNextPage: boolean;
|
||||
endCursor: Cursor;
|
||||
}
|
||||
|
||||
export interface Connection<T> {
|
||||
|
||||
Reference in New Issue
Block a user