Open SebaBoler opened 1 year ago
Hi @SebaBoler, that's because your TypeORM config has 'query' logging turned on (see: https://typeorm.io/logging), even if I can't see it from the configuration options. Connect-typeorm does not output anything to the console by default. (Also I've been warned the docs are a bit out of date but I haven't had time to fix them, you can check how I usually configure it in #37)
Those queries are executed because connect-typeorm acts as a sort of middleware, allowing you to access the user's info from the request object and as such, every time a request is made connect-typeorm will scan the session table and return the correct object, thus producing a query log.
I couldn't replicate your issue on my dev Express backend and I can only get two queries to DB for each request (SELECT and UPDATE), could you replicate it on a repo?
i will create simple repo. Give me few days
Contact Details
No response
Bug description
After start server NestJs + TypeOrm + Graphql session few times tried to update
Next issue after when I used Mutation to login and inserted first session to entity, server just started spam update and changing session.destroyedAt. Its not good practice to spam like that every milisecond.
Its any chance to disabled that to setup manually or adjust time to next update ?
My configuration
Steps to reproduce
.
Additional Information
No response