(
suffix: string,
invalidates: ReadonlyArray<Query.Target> = [],
afterRefetch = false
)
| 132 | yield* Effect.addFinalizer(() => Effect.sync(handle.unregister)) |
| 133 | yield* flush |
| 134 | const edit = ( |
| 135 | suffix: string, |
| 136 | invalidates: ReadonlyArray<Query.Target> = [], |
| 137 | afterRefetch = false |
| 138 | ) => |
| 139 | cache.beginRun({ |
| 140 | command: "Edit", |
| 141 | invalidates, |
| 142 | afterRefetch, |
| 143 | optimistic: [ |
| 144 | GetNote.patch({ id: "1" }, (note) => ({ |
| 145 | ...note, |
| 146 | title: note.title + suffix |
| 147 | })) |
| 148 | ] |
| 149 | }) |
| 150 | return { seen, edit } |
| 151 | }) |
| 152 |
no test coverage detected