Intended outcome:
According to this PR #3001 , cacheResolvers is now cacheRedirects
Actual outcome:
Several occurences of cacheResolvers (instead of cacheRedirects) still exist in the repo.
How to reproduce the issue:
Could you fix cacheResolvers occurences in the doc :
Could you fix cacheResolvers occurences in the code :
Version
As I can see in the newest apollo-boost package, there is also an interesting third parameter called getCacheKey.
Now the import { toIdValue } from 'apollo-utilities'; is no more required.
The example code is
cacheRedirects: {
Query: {
movie: (_, { id }, { getCacheKey }) =>
getCacheKey({ __typename: 'Movie', id });
}
}
Be careful with the id field if you had previously declared a specific dataIdFromObject configuration.
Maybe you could add a version select in the documentation as can be seen in the lodash documentation
/label docs
Thanks for reporting this. There hasn't been any activity here in quite some time, so we'll close this issue for now. If this is still a problem (using a modern version of Apollo Client), please let us know. Thanks!
Most helpful comment
As I can see in the newest apollo-boost package, there is also an interesting third parameter called
getCacheKey.Now the
import { toIdValue } from 'apollo-utilities';is no more required.The example code is
Be careful with the
idfield if you had previously declared a specificdataIdFromObjectconfiguration.