graasp / graasp/graasp-apps-query-client

Persist mutations locally only when the request complete successfully

Open
#154 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

I removed it because actually, the patch already happens in the `onMutate` callback. However, it makes me wonder if we shouldn't move this to the `onSuccess` so that patch events are locally persisted only if the request is completed successfully.

_Originally posted by @swouf in https://github.com/graasp/graasp-apps-query-client/pull/142#discussion_r1286002277_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the mutation implementation that uses the onMutate and onSuccess callbacks, then read how patch events are persisted and how request failures are handled. Done means persistence happens only after a successful request, with the relevant success and failure behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.