-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathPageInfo.java
More file actions
36 lines (30 loc) · 1.13 KB
/
PageInfo.java
File metadata and controls
36 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package graphql.relay;
import graphql.PublicApi;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Represents pagination information in Relay about {@link graphql.relay.Edge edges} when used
* inside a {@link graphql.relay.Connection connection}
*
* See <a href="https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo">https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo</a>
*/
@PublicApi
@NullMarked
public interface PageInfo {
/**
* @return cursor to the first edge, or null if this page is empty.
*/
@Nullable ConnectionCursor getStartCursor();
/**
* @return cursor to the last edge, or null if this page is empty.
*/
@Nullable ConnectionCursor getEndCursor();
/**
* @return true if and only if this page is not the first page. only meaningful when you gave the {@code last} argument.
*/
boolean isHasPreviousPage();
/**
* @return true if and only if this page is not the last page. only meaningful when you gave the {@code first} argument.
*/
boolean isHasNextPage();
}