Apollo-client-devtools: Load from cache doesn't return

Created on 17 May 2017  路  4Comments  路  Source: apollographql/apollo-client-devtools

In the extension, select a query then check "load from cache"
The spinner appears and the results are not returned.
Unchecking the options returns the correct results from the server.
The correct items appear to be in the cache (Store tab) and ROOT_QUERY.

馃悶 bug

Most helpful comment

@rrdelaney I ran into the same issue and found that through Apollo Client the cache was accessed correctly. The issue may be that noFetch should be changed to fetchPolicy: "cache-only", since noFetch no longer exists.

All 4 comments

Thanks for filing an issue! What version of Apollo a client are you using?

~~
"apollo-client": "^1.2.2",
"react-apollo": "^1.2.0",
~
~

I think the issues is related to https://github.com/apollographql/apollo-client/issues/1708

I.e., some internal error in apollo client (failing silently).

@rrdelaney I ran into the same issue and found that through Apollo Client the cache was accessed correctly. The issue may be that noFetch should be changed to fetchPolicy: "cache-only", since noFetch no longer exists.

@evanshauser Thanks for looking into this more! Hopefully I can look into this later tonight.

This is probably where the code should be updated: https://github.com/apollographql/apollo-client-devtools/blob/master/app/components/Explorer/Explorer.js#L82

We probably have to provide noFetch and cache-only because older Apollo clients don't support fetchPolicy

Was this page helpful?
0 / 5 - 0 ratings

Related issues

meyer picture meyer  路  3Comments

ryannealmes picture ryannealmes  路  5Comments

konsumer picture konsumer  路  7Comments

iki picture iki  路  7Comments

backjo picture backjo  路  6Comments