-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination: Errors on initial page not reported #3413
Comments
@pixelmatrix thanks for reporting! I'll take a look at this one today. |
To summarize the issue:
The net effect of this is we aren't surfacing |
Related to this, it seems if there is a 200 OK failure when another page is loading via |
That should also be handled by apollographql/apollo-ios-dev#428 – thank you for reporting. |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better. |
Summary
I'm using an instance of
AsyncGraphQLQueryPager
to fetch some data. As I was testing today I had a problem where the subscribe callback was not being called. After looking into it, the first page query actually failed to load.It looks like the
onFetch
method switches over theResult<GraphQLResult<DataType>, Error>
to check for errors, but inside theSuccess
case, it assumes there will always be data:https://github.com/apollographql/apollo-ios-pagination/blob/main/Sources/ApolloPagination/AsyncGraphQLQueryPagerCoordinator.swift#L302
In my case,
data.data
isnil
, anddata.errors
contains an error from the server. Instead, I was expecting that the subscriber would be called with an error.Version
0.1.0
Steps to reproduce the behavior
subscriber
to print the resultsfetch()
on the pagersubscriber
closure is never calledLogs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: