Closed barbaraliau closed 7 years ago
Update: refetch()
is working but too quickly. It is reading from mongo before mongo has even saved the data.
User can now remove card with one button click. 'Remove Card' button is disabled while submitting request.
Leftover issues: need to properly account for errors. This has not been tested.
Haven't figured out how to get
refetch()
to work. Data is being cached and new fetches aren't happening. I've tried putting inforceFetch: true
but I may not be putting it in the right place. Subsequent releases ofreact-apollo
fix this but there are major API changes that go along with going this route.Quick fix would be to force a
window.location.reload()
.If we can't get
refetch()
to work, that would be my vote, at least as a temporary fix. It's not an action that a user should be doing very much.