Skip to content

Should I make my Mutations and Queries @Transactional #1010

Answered by dariuszkuc
RIP21 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello 👋

With traditional servlet based REST APIs you work with endpoints that provide you complete responses and also have access to request level scope that helps to manage your transactions. Once you move to the reactive Webflux based APIs (which we use in graphql-kotlin-spring-server), AFAIK those annotations won't work and you will have to programmatically manage your transactions.

GraphQL is slightly different that you requests are always processed through the single /graphql endpoint that parses the requests and resolves each field independently of each other. Since single GraphQL request can span multiple queries or mutations, creating transactions per query/mutation may not be wha…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@RIP21
Comment options

@RIP21
Comment options

@dariuszkuc
Comment options

Answer selected by RIP21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants