Closed meddyrainzo closed 5 years ago
The reasons for not using auto-commit transactions with the Neo4j drivers are that these transactions cannot participate in a causal consistency chain and network inefficiencies (auto-commit transactions are sent immediately, without sharing network packets).
The causal chain issue is not (yet) relevant here, as we don't (currently) expose the bookmarks returned by the drivers necessary for a causal chain. However, the network efficiency issue is enough reason for switching to the use of Neo4j driver transaction functions.
Also, because GraphQL separates queries (reads) and mutations (writes) we can leverage the WriteTransaction
and ReadTransaction
functions in neo4j-driver.
I'll make this change. Thanks for bringing up the issue @meddyrainzo!
Fixed in 1fbc747ec090e538f61f192f77749eb7f1aa878a
This is more of a question than an issue/bug
Reading the documentation of the neo4j javascript driver, it warns against using auto-commit transactions in production. It advices to use transactional-functions wherever possible.
Is there any reason why auto-commit transactions were chosen over transaction functions for this project?