Backward pagination issue - "Expected forward pagination metadata to be available"
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Hey Guys, I've been trying to make it work for quite a bit of a time and I think I am stuck and need some help
Not sure if it's a bug (as error message suggests) or maybe I miss someting?
Many thanks in advance for any help/leads ...
```
const { data, loadNext, refetch } = usePaginationFragment(
graphql`
fragment UserGroupList_User on User @refetchable(queryName: "UserGroupListPaginationQuery") {
id
groups(last: $count, before: $cursor) @connection(key: "UserGroupListList_groups") {
edges {
node {
id
name
...GroupRow_Group
}
}
}
}
`,
props
);
```
When I try rendering the screen I get this nasty bold red error;
```
Invariant Violation: Relay: Expected forward pagination metadata to be available. If you're seeing this, this is likely a bug in Relay.
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0
at [native code]:null in flushedQueue
at [native code]:null in invokeCallbackAndReturnFlushedQueue
```
Contributor guide
Assessment
This issue has not been assessed yet.