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

Add refetch queries to create and delete mutations. #1387

Merged
merged 2 commits into from
Oct 22, 2020

Conversation

peterp
Copy link
Contributor

@peterp peterp commented Oct 22, 2020

We've changed to the default caching policy in Apollo's client. So now we're require to update our cache manually. This adds a stop-gap solution which reloads the queries.

We're going to evaluate different GraphQL clients, and based on the evaluation, we'll add a more robust cache updating technique or switch libraries.

@peterp peterp requested a review from jtoar October 22, 2020 18:51
@thedavidprice
Copy link
Contributor

👍 adding the link to doc

@jtoar
Copy link
Contributor

jtoar commented Oct 22, 2020

@peterp Thank you! 🚀 Reviewing now, just want to pull down and run it locally.

@jtoar
Copy link
Contributor

jtoar commented Oct 22, 2020

@peterp can't get it to work locally; still seeing the same behavior. Just to confirm the steps:

  • made new redwood app
  • upgraded it to canary
  • pulled down this branch in my local copy of this repo, yarn installed and built
  • yarn rwt cp to redwood app
  • generated scaffold (I see refetchQuery and awaitRefetchQueries there, so everything looks good)
  • should work?

@peterp
Copy link
Contributor Author

peterp commented Oct 22, 2020

Ok! Computers are awesome, but humans are dumb. I'm sorry I type code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants