Establish pattern for bulk operations on compliance-related items
While working on Resolve "Apply Compliance Framework" (!115031 - merged) I've discovered that GraphQL API I need to use for implementing "bulk operations" accepts single project
While our apollo-link-batch does a good job in handling bunch of queries, batching them by 10, it still grades as "ok" but far from "great":
- user will clearly see items updated in batches
- network errors will fail batch, leaving part of items changed, part of them not
- communicating errors becomes very tricky (actually we need to think of design patterns how we should communicate item-specific errors for such bulk operations)
Basically we have three options to consider:
- introduce new bulk APIs for such operations (I'm not very supportive of this one, see below)
- implement graphql APIs with batches in mind, since setting framework for one project is just a batch of one (we've had positive experience with such approach in my previous team, that's why I might be biased towards that)
- Establish as a "general" rule (there always could be exceptions) that we are doing 'per-item' APIs. In that case I will be more than happy to use this issue to discuss answers to the questions above and probably update handbook on that
Edited by Illya Klymov