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

fix(Query): track previousData for showing while loading #1639

Merged
merged 4 commits into from
Feb 9, 2018

Conversation

arahansen
Copy link
Contributor

@arahansen arahansen commented Feb 7, 2018

fixes #1635

this ports functionality that was in graphql.ts over to Query.tsx

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes) (N/A)
  • Make sure all of the significant new logic is covered by tests
  • If this was a change that affects the external API used in GitHunt-React, update GitHunt-React and post a link to the PR in the discussion. (N/A)

Note:

I wasn't able to get pre-commit hooks to run, I kept getting a "could not find directory ./node_modules/pre-commit"

@jbaxleyiii jbaxleyiii merged commit 5f0279a into apollographql:master Feb 9, 2018
@arahansen
Copy link
Contributor Author

Thanks for merging this! Any chance we could get a new cut of the beta branch? Would love to continue playing with the Query component.

@arahansen arahansen deleted the query-fix branch February 9, 2018 17:27
@derek-duncan
Copy link

@jbaxleyiii Can we get a new beta with this fix? I'm up for helping out with anything we need to get there too

@clayne11
Copy link
Contributor

This is incredibly undesirable behavior IMO. If the variables change we shouldn't be returning data from the previous variables as they don't match the query we're performing. It's possible to add a cache like this in userland code, however it's impossible to revert to the opposite behavior once this is in place.

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 this pull request may close these issues.

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