In my project, my graphql context has 2 db sessions:
'session': database.db_session,
'ro_session': database.ro_db_session,
For some read-only queries, I like to use ro_session which points to my read-only replica. However, afaict, the sqlalchemy_loader key can only point to one session. Would it be possible to somehow use the session an object was loaded with, instead of having to set sqlalchemy_loader?
In SqlAlchemy object_session() handles this.
Thank you!
Feature Request Type
In my project, my graphql context has 2 db sessions:
For some read-only queries, I like to use
ro_sessionwhich points to my read-only replica. However, afaict, thesqlalchemy_loaderkey can only point to one session. Would it be possible to somehow use the session an object was loaded with, instead of having to setsqlalchemy_loader?In SqlAlchemy object_session() handles this.
Thank you!
Feature Request Type