[Types] PageInfo types are incorrect (should be read-only)
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
**Issue**
The types for `PageInfo` under [ConnectionInterface](https://github.com/facebook/relay/blob/main/packages/relay-runtime/handlers/connection/ConnectionInterface.js#L25) should be read-only.
**Example**
`ConnectionInterface.js` they are writable
```
export type PageInfo = {
endCursor: ?string,
hasNextPage: boolean,
hasPreviousPage: boolean,
startCursor: ?string,
...
};
```
But if you run the relay compiler and generate types, the `PageInfo` for those types is read-only:
```
+pageInfo: {|
+startCursor: ?string,
+hasNextPage: boolean,
+endCursor: ?string,
|},
```
Any suggestions for how we should fix this? At the moment, we simply set those types ourselves.
Thank you for the help,
Contributor guide
Assessment
This issue has not been assessed yet.