DEV Community

Discussion on: Automatically Update Apollo Cache after Mutations

Collapse
pau1fitz profile image
Paul Fitzgerald

One thing I noticed after going through the code in more detail. I think this line is incorrect, at least in my case. data is what is created by the mutation, not the cached array. Have I misunderstood something or is this correct?

else {
  allTasks = [data];
}
Collapse
wtrocki profile image
Wojtek Trocki

Yes. This is correct. Offix helper does that now