Skip to content

Transactions with QueryService in Custom Resolver #234

Answered by TriPSs
danjirovec asked this question in Q&A
Discussion options

You must be logged in to vote

This is not possible by using the query services, you would need to create a transactions with TypeORM itself and use that query runner with the query builder (or the manager) and directly insert it yourself.

Since the createOne logic uses TypeORM .save you could also try to pass it all down to the customers service createOne, I think if configured correctly TypeORM will create/save the relation correctly.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by danjirovec
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