Comments (3)
Workaround: Change the order that the decorators are applied.
from drivine.
The order of the @Transactional
decorator is important in other ways too it seems.
Using Nest's default GraphQL implementation, the following breaks:
// Transactional first, Query second
@Transactional()
@Query()
async someQuery(): Promise<SomeModel> {
// ...
}
However this works fine:
// Query first, Transactional second
@Query()
@Transactional()
async someQuery(): Promise<SomeModel> {
// ...
}
from drivine.
@NilsMoller If you have time and able to submit some usage patterns you have with GraphQL, I would like to provide some guidance for that in the docs.
Meanwhile, for the txn decorator. One solution would be to more tightly integrate with Nest. Originally I created this decorator to not use anything from Nest, so it would be easy to port Drivine to use with eg AWS Lambda. But didn't get time to take that forward. Eg Nest's way would use reflect-metadata, and their interceptor hooks.
Or another solution is just trace why order is important, and workaround what's happening.
from drivine.
Related Issues (20)
- Migrating to agens-graph on my my nestjs app HOT 5
- TransactionContextMiddleware seems unnecessary HOT 5
- Error: variable does not exist - Apache AGE HOT 5
- Website is down HOT 1
- Could not perform discovery errors HOT 14
- drivine.org a sign of status? HOT 5
- Broken link for the user guide HOT 1
- Calling `RunWithDrivine()` when using `it.each` in a test file causes `TypeError: it.each is not a function` HOT 7
- Neo4j connections are not properly released when using @Transactional and concurrency HOT 11
- Transactional persistence manager is used when no @Transactional decorator is set when running concurrent queries HOT 11
- Domain drivine.org leads to 404 page HOT 2
- Mismatch between npm package licence and licens on github HOT 1
- Error: SRID expected to be either a number or an Integer object but was: undefined HOT 6
- @nestjs/common@">= 6 <= 7" from @liberation-data/[email protected] HOT 2
- Upgrade nanoid dependency version to solve moderate vulnerability
- Use Transactions in Tests HOT 3
- [Question] Possible to initialize with configuration (or any other injected service) and how are environment variables parsed? HOT 5
- [Bug] @InjectPersistenceManager not resolved as dependency when other @Inject parameters are present HOT 10
- [Docs] Show examples of unit testing with Drivine HOT 13
- [Docs] [Bug] The documentation site does not have a side menu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drivine.