MCPcopy Create free account
hub / github.com/Effect-TS/effect / edit

Function edit

packages/effect/test/ui/StreamQuery.test.ts:134–149  ·  view source on GitHub ↗
(
    suffix: string,
    invalidates: ReadonlyArray<Query.Target> = [],
    afterRefetch = false
  )

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

patchMethod · 0.65

Tested by

no test coverage detected