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

Batching mechanism for useBulkMutation or globally #103

Open
josejulio opened this issue Sep 3, 2020 · 0 comments
Open

Batching mechanism for useBulkMutation or globally #103

josejulio opened this issue Sep 3, 2020 · 0 comments

Comments

@josejulio
Copy link
Contributor

When using useBulkMutation with a large number of elements, it triggers a lots of request (expected).

I was thinking to include a way to be able to batch the requests and got some ideas:

  • Depend on a library (i.e. p-limit) and allow to configure the number of requests at once on the useBulkMutation
    • The problem here, is that this library has no dependencies, so this would break that "feature"
  • Add p-limit as an optional dependency
  • Provide a second param to the mutate of useBulkMutation to specify a function wrapper for the query call (see POC).
  • Provide a way to hook onto the client.query call to allow for global batching or action-batching

Not really sure if any of these sound OK to you.

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

No branches or pull requests

1 participant