Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake client-side idempotency #34

Closed
dkzlv opened this issue Mar 6, 2024 · 0 comments · Fixed by #36
Closed

Fake client-side idempotency #34

dkzlv opened this issue Mar 6, 2024 · 0 comments · Fixed by #36

Comments

@dkzlv
Copy link
Member

dkzlv commented Mar 6, 2024

I think, given that FE forms/buttons can trigger the same mutation as many times as you want, it would probably be a good idea to add some client-side fake idempotency? Obviously we cannot change the way the API works, but we should at least protect the developer from calling the same mutation function multiple times.

So the idea is pretty straightforward: no simultaneous calls of one mutate function. If you call mutate, all subsequent calls to it will immediately return nothing and not trigger the mutation function until the initial mutation function resolves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant