Skip to content
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

cache-only fetchPolicy: error not passed to Query component if query cannot be resolved from cache #3343

Closed
WickyNilliams opened this issue Apr 19, 2018 · 1 comment
Labels
🚧 in-triage Issue currently being triaged

Comments

@WickyNilliams
Copy link

Intended outcome:

When using a Query component with a fetchPolicy of cache-only, if the query cannot be resolved from cache, I would expect error to be passed to the render prop:

<Query
  query={queryThatCantBeResolvedFromCache}
  fetchPolicy="cache-only"
>
  {({ loading, data, error }) => {
    // expect `error` to be populated here
  }}
</Query>;

Actual outcome:

Would expect an error to be passed to render prop.

How to reproduce the issue:

https://codesandbox.io/s/p7vrkmlkmj

Version

  • apollo-client@2.2.8
@ghost ghost added the has-reproduction label Apr 19, 2018
@jbaxleyiii jbaxleyiii added the 🚧 in-triage Issue currently being triaged label Jul 9, 2019
@jbaxleyiii
Copy link
Contributor

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!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🚧 in-triage Issue currently being triaged
Projects
None yet
Development

No branches or pull requests

2 participants