In GraphQL, there’s a bit of inconsistency with the semantics of the resolvers that are generated for each entity.
The addXXX resolver allows for multiple entity payloads to be specified as arguments, and for multiple entities to be created simultaneously.
Likewise, the deleteXXX resolver allows for multiple ids or a filter to delete multiple entities simultaneously.
The updateXXX resolver, however, only allows for the same mutation fields to be applied to matching entities.
It would be more useful if the input arguments for updateXXX resolver would be [UpdateXXXInput!]!, as it is for add.
In this way, I could create a mutation that allows for the batch adding, updating or deleting of entities in many areas of a graph atomically in a single request.
@martaver, I like the idea. I had something like this with my custom graphql api (not dgraph). The only différence would be that each update clause would have to have its own filter most likely. Here is how I implemented this in my api and how it might look one way with dgraph concept:
I think more of a question/feature request. A way to update a set of data with their own individual updates in q single update. Right now you can update a set with the same patch but no way to do a patch for each.