allenA
Convex Community3y ago
12 replies
allen

Optimistic Update on Paginated Query

Is there an example of an optimistic update on a paginated query? I'm unsure of how the paginationOpts are cache-keyed to make sure I can get the right item from cached.

const current = store.getQuery('messages/queries/messages', {
  type: 'inbox',
  paginationOpts: {}, //what goes here to make sure I get whatevers current?
});


For context, what I'm trying to accomplish is when a doc is soft deleted, ensure it is optimistically removed from the paginated result set(s) its present in.
Was this page helpful?