Skip to content

building an offline first application that doesn't require extensive custom updates #1058

Answered by JoviDeCroock
chrisdrackett asked this question in Q&A
Discussion options

You must be logged in to vote

The thing you are describing is quite automatic anyway, so if your deleteTask returns a Task:id that is present in cache will make it automatically update, so let's say Task:1 is in cache and deleteTask returns the following:

deleteTask {
  id: 1,
  __typename: 'Task',
  isDeleted: true
}

Then this task will be updated to have isDeleted: true this could be due to it being present in cache due to a former query, ... When we can't find said Task due to it being an addTask, .. (create task) we'll need you to show us how it connects to your rootTypes.

This could be for instance a task that is assigned to a user OR Query.task(id: x) returning said task.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@kitten
Comment options

@chrisdrackett
Comment options

@kitten
Comment options

@chrisdrackett
Comment options

@smontlouis
Comment options

Answer selected by JoviDeCroock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants