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

Option to update multiple #1434

Open
TriPSs opened this issue Oct 25, 2021 · 1 comment
Open

Option to update multiple #1434

TriPSs opened this issue Oct 25, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@TriPSs
Copy link

TriPSs commented Oct 25, 2021

Is your feature request related to a problem? Please describe.
I build dynamic forms in where I have to update one or multiple items, to run a GraphQL request for each item is not preferred and would like to do this in one call to the API. The existing updateMany only provides an update mechanising to update multiple records with the same data.

Have you read the Contributing Guidelines?

Yes

Describe the solution you'd like
Add the option updateMultiple that accepts an array of inputs like the updateOne, loops through them and updates each record.

Describe alternatives you've considered
Creating the resolver custom for each type requiring it.
Hacking the frontend to create the GraphQL query dynamically and add the updateOne as many times as required.

@TriPSs TriPSs added the enhancement New feature or request label Oct 25, 2021
@psteinroe
Copy link
Contributor

I think just executing many requests from the frontend should be a fairly reasonable solution. See a discussion on batch queries here: urql-graphql/urql#800

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

No branches or pull requests

2 participants