Comments (5)
@AntonPuko @gaspard
vesper mutation controller has the transaction params to true as default. Make sure you set it to false and test it again.
from vesper.
@yubozhao yep, it works with transactions disabled for those queries.
from vesper.
thanks for the PR but its not a fix. I never faced the issue you are describing, can you please elaborate and provide more information, some real reproduction?
from vesper.
Here is a demo of the bug in action:
The first part of this gif shows the original vesper code.
The second part shows with the fix.
As you can see, batch operations fail with current vesper code but work fine with the fix I propose.
If you want to reproduce this, you can close this repo.
Use origin/vesper
branch !!
https://github.com/lucidogen/lucidogen
The server is in packages/apps/todomvc-server
, the client app is in packages/apps/todomvc
.
You need to run npm i && npm run start
in each of these directories.
(at the end of the gif, you can see the error reported in the terminal: due to ts-node, the file is wrong but when using tsc and then the JS file, it is effectively from index.js in vesper).
from vesper.
@pleerock Hi, I have pretty the same issue, when trying to run many mutations simultaneously.
I get:
TypeError: this.connection.getMetadata is not a function
TypeError: this.connection.getMetadata is not a function
at EntityManager.<anonymous> (D:\PROG\gm-intelligence\chatbot.gql-server\src\entity-manager\EntityManager.ts:575:42)
at step (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:32:23)
at Object.next (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:13:53)
at D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:7:71
at Promise (<anonymous>)
at __awaiter (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:3:12)
at EntityManager.findOne (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:431:16)
at EntityManager.<anonymous> (D:\PROG\gm-intelligence\chatbot.gql-server\src\entity-manager\EntityManager.ts:620:21)
at step (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:32:23)
at Object.next (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:13:53)
at EntityManager.<anonymous> (D:\PROG\gm-intelligence\chatbot.gql-server\src\entity-manager\EntityManager.ts:575:42)
TypeError: Cannot read property 'type' of undefined
at D:\PROG\gm-intelligence\chatbot.gql-server\src\index.ts:141:60
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at step (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:32:23)
at Object.next (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:13:53)
at D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:7:71
at Promise (<anonymous>)
at __awaiter (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:3:12)
at EntityManager.findOne (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:431:16)
at EntityManager.<anonymous> (D:\PROG\gm-intelligence\chatbot.gql-server\src\entity-manager\EntityManager.ts:620:21)
at step (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:32:23)
at Object.next (D:\PROG\gm-intelligence\chatbot.gql-server\node_modules\typeorm\entity-manager\EntityManager.js:13:53)
on random of those requests. @gaspard fix doesn't really help since I just get another undefined errors.
It looks like container from typeDI doesn't inject all deps properly in time of those requests..or something like that.
My tsconfig.json config:
"compilerOptions": {
"allowJs": true,
"baseUrl": ".",
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["es6", "esnext", "dom"],
"module": "esnext",
"moduleResolution": "node",
"outDir": "build/dist",
"rootDir": "src",
"sourceMap": true,
"target": "es5"
},
I'm on windows 10, using postgress for DB and folllowing deps versions:
"pg": "^7.4.3",
"typeorm": "^0.2.7",
"typescript": "^2.9.2",
"vesper": "^0.1.9"
Let me know if you need some more info or anything.
from vesper.
Related Issues (20)
- There is any plan to support Koa?
- Multi connexion DB
- Implementing Relay-compatible connections
- Resolver doesn't work with subscription HOT 1
- Authentication in subscription
- Ability to customize topic/trigger sbscribed to at subscription initialization time? HOT 1
- Select only limited query params HOT 1
- Need a way to set typeorm connection charset HOT 3
- Batch resolve method should be invoked N times for N aliases with different arguments.
- EntityManager doesn't work with existing TypeORM project HOT 2
- Any Example for Basic Authentication
- Project outdated? HOT 11
- Uploade image HOT 2
- Custom errors format
- Is this dead? HOT 3
- Add custom playground url
- Apollo context
- Vesper Build failure HOT 2
- Your website is broken (blank screen)
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 vesper.