You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the broadcastQueries function may be using the incorrect ID when it invokes callbacks. I've noticed this when my React components have been supplied with incorrect callback data. In one example, the REST provider invoked the same callback twice with different data, breaking my code.
My guess here is that the incorrect ID is being extracted from the map enumeration inside the iterator; if you look at the attached image, you can see a query with ID of 14 is received, but inside broadcastQueries a callback of ID 4 is being invoked; this means my component gets the wrong data.
After more research, I think this is caused by apollographql/apollo-link-rest#197; specifically, the caching engine is incorrectly setting values because it isn't replacing the arguments properly.
Definitely cache related; if I disable the cache with "no-cache" network policy then everything works as intended. I will close this issue and chase up with the REST provider.
(Not sure this is 100% correct; please verify)
I think the broadcastQueries function may be using the incorrect ID when it invokes callbacks. I've noticed this when my React components have been supplied with incorrect callback data. In one example, the REST provider invoked the same callback twice with different data, breaking my code.
My guess here is that the incorrect ID is being extracted from the map enumeration inside the iterator; if you look at the attached image, you can see a query with ID of 14 is received, but inside broadcastQueries a callback of ID 4 is being invoked; this means my component gets the wrong data.
Version data:
System:
OS: macOS High Sierra 10.13.6
Binaries:
Node: 11.6.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Browsers:
Chrome: 72.0.3626.121
Safari: 12.0.3
npmPackages:
apollo-cache-inmemory: ^1.4.2 => 1.4.3
apollo-client: ^2.4.12 => 2.4.13
apollo-link: ^1.2.8 => 1.2.8
apollo-link-error: ^1.1.7 => 1.1.7
apollo-link-http: ^1.5.11 => 1.5.11
apollo-link-rest: ^0.7.0 => 0.7.0
apollo-link-retry: ^2.2.10 => 2.2.10
react-apollo: ^2.4.1 => 2.4.1
The text was updated successfully, but these errors were encountered: