Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

[2.1.0-beta.2] Query always alternates returning undefined, and response for data #1635

Closed
arahansen opened this issue Feb 7, 2018 · 0 comments · Fixed by #1639
Closed

Comments

@arahansen
Copy link
Contributor

arahansen commented Feb 7, 2018

Intended outcome:
Query should call children with the previous result while loading

Actual outcome:
Query calls children with { data: undefined }, then again with { data: <populatedData> } once the response finishes.

How to reproduce the issue:
Log response in children while modifying variables

<Query query={query} variables={variables}>
  {({ data }) => { 
    // undefined, then populated even if there is content available in cache
    console.log(data) 
  }}
</Query>

Version

  • apollo-client@2.2.0
  • react-apollo@2.1.0-beta.2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant