File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -348,15 +348,15 @@ const api = createApi({
348
348
// A queryFn returning an empty array is used, with contents being populated via
349
349
// streaming updates below as they are received.
350
350
queryFn : () => ({ data: [] }),
351
- async onCacheEntryAdded(arg , { updateCacheEntry , cleanup }) {
351
+ async onCacheEntryAdded(arg , { updateCachedData , cacheEntryRemoved }) {
352
352
const ws = new WebSocket (' ws://localhost:8080' )
353
353
// populate the array with messages as they are received from the websocket
354
354
ws .addEventListener (' message' , (event ) => {
355
- updateCacheEntry ((draft ) => {
355
+ updateCachedData ((draft ) => {
356
356
draft .push (JSON .parse (event .data ))
357
357
})
358
358
})
359
- await cleanup
359
+ await cacheEntryRemoved
360
360
ws .close ()
361
361
},
362
362
}),
You can’t perform that action at this time.
0 commit comments