nestjs-query
nestjs-query copied to clipboard
Option to update multiple
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.
I think just executing many requests from the frontend should be a fairly reasonable solution. See a discussion on batch queries here: https://github.com/FormidableLabs/urql/issues/800