-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
previousQueryResult object is empty in updateQuery when changing query variables while the fetchMore is in progress #7241
Comments
@Allaoua9 Thanks for the reproduction! When you change the Since it sounds like you don't want the change of const client = new ApolloClient({
link: new SchemaLink({ schema: executableSchema }),
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {
thingsList: {
// By default, this configuration would include all arguments in the field key,
// which would be equivalent to keyArgs:["filter", "page"]. By specifying
// keyArgs: ["page"] we are effectively removing the "filter" argument:
keyArgs: ["page"],
},
},
},
},
}),
}); You could also probably use See #7175 for some new pagination documentation that we've been working on, in case you want a whole lot more detail about how this system works. |
Thanks for the answer @benjamn ! |
Let us know if #7241 (comment) didn't help. Thanks! |
@hwillson it dit help thank you ! |
Intended outcome:
Hypothesis:
For simplicity sake, let's say, all queries take 500ms.
Steps to reproduce :
Actual outcome:
When the updateQuery is called, the previousQueryResult is empty.
How to reproduce the issue:
Here is a reproduction of this bug
https://codesandbox.io/s/reproduction-for-react-apollo-7241-with-successful-response-forked-lvypl?file=/src/ThingsList.jsx
Versions
@apollo/client 3.2.5
The text was updated successfully, but these errors were encountered: