DEV Community

Bimo Prasetyo Afif
Bimo Prasetyo Afif

Posted on

Golang gRPC handler with 2 service/usecase. should use transaction?

Hi guys, i have backend golang. i build 1 gRPC handler that calling 2 usecase/service with 2 different repository of course.

i confuse how to implement transaction in handler.

let say in gRPC handler, it calling Create Order service and Create New User service. when the first service successful store data, but the second failed.

any suggestion? or wanna discuss about it? let me know :)

Top comments (1)

Collapse
 
bimbimprasetyoafif profile image
Bimo Prasetyo Afif

nevermind, i have solve this with seperate domain