Skip to content

Commit ffdaf3f

Browse files
committed
hasPrevious/NextPage should not be optional (#30)
Replicates graphql/graphql-relay-js@91a8525
1 parent af8b653 commit ffdaf3f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: src/graphql_relay/connection/connectiontypes.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ def startCursor(self) -> Optional[ConnectionCursor]:
2020
def endCursor(self) -> Optional[ConnectionCursor]:
2121
...
2222

23-
def hasPreviousPage(self) -> Optional[bool]:
23+
def hasPreviousPage(self) -> bool:
2424
...
2525

26-
def hasNextPage(self) -> Optional[bool]:
26+
def hasNextPage(self) -> bool:
2727
...
2828

2929

@@ -33,8 +33,8 @@ def __call__(
3333
*,
3434
startCursor: Optional[ConnectionCursor],
3535
endCursor: Optional[ConnectionCursor],
36-
hasPreviousPage: Optional[bool],
37-
hasNextPage: Optional[bool],
36+
hasPreviousPage: bool,
37+
hasNextPage: bool,
3838
) -> PageInfoType:
3939
...
4040

@@ -44,8 +44,8 @@ class PageInfo(NamedTuple):
4444

4545
startCursor: Optional[ConnectionCursor]
4646
endCursor: Optional[ConnectionCursor]
47-
hasPreviousPage: Optional[bool]
48-
hasNextPage: Optional[bool]
47+
hasPreviousPage: bool
48+
hasNextPage: bool
4949

5050

5151
class EdgeType(Protocol):

0 commit comments

Comments
 (0)