Mando75 / typeorm-graphql-loader

A query builder to easily resolve nested fields and relations for TypeORM-based GraphQL servers
https://gql-loader.bmuller.net
MIT License
57 stars 12 forks source link

Don't use transactions to read the data #18

Closed blitss closed 4 years ago

blitss commented 4 years ago

Hi Bryan, I'm following up on my issue on Gitlab: https://gitlab.com/Mando75/typeorm-graphql-loader/-/issues/12. I don't have Gitlab keys set-up, sorry ;(

This PR changes GraphQLQueryManager, so it longer uses transactions for reading data, and also delegates reading to the replicas whenever they're available (that is default Typeorm behaviour when you use .find({})). This PR is still requires testing in the live projects, but I think there would be no breaking changes. It's passing all the tests though.

Cheers,