How to implement a set of GraphQL mutations in single transaction?

Technology CommunityCategory: GraphQLHow to implement a set of GraphQL mutations in single transaction?
VietMX Staff asked 3 years ago

GraphQL has a mutation root object, which can have one or more top level fields. These top level fields are the individual mutations. If we want a service with transaction behavior, we’ll implement it as a single mutation. The back-end implementation has to deal with how to ensure transactional behavior.

It’s important to denote the difference between mutations and requests, especially regarding concurrency. Each request performs the individual mutations of that request in serial, but multiple requests can be processed concurrently.