[Modern] ReactRelayPaginationContainer pageInfo warning
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
The ReactRelayPaginationContainer complains about missing pageInfo fields whenever no edges are returned from a connection. Specifically, I am seeing this warning whenever pageInfo.endCursor === null. I am able to silence the warning by returning an empty string for pageInfo.endCursor. Is an empty string the expected value in this situation or am I missing something else?
Example response:
```
{
"data": {
"user": {
"postsConnection": {
"edges": [],
"pageInfo": {
"hasNextPage": false,
"endCursor": null,
"hasPreviousPage": false,
"startCursor": null
}
}
}
}
}
```
Warning:
```
Warning: ReactRelayPaginationContainer: Cannot paginate without pageInfo fields in `MyView`. Be sure to fetch hasNextPage (got `false`) and endCursor (got `null`).
```
Contributor guide
Assessment
This issue has not been assessed yet.