Closed Philaeux closed 11 months ago
I don't have the problem anymore (seems like I can't reproduce). Might have been linked to the SQLite driver (I switched to a docker postgresql in dev, considering how easy it's to set up an environment similar to prod).
Also switched the function to async def
for good mesure.
Describe the Bug
After a
session.commit()
, SQLAlchemy entities can't be turned into GraphQL object because of access on outside session objects. To explain the bug, consider this mutation:This code gives me this error (doesn't matter if the object is added or just updated, both cases raise the error)
However, if I use the return line commented with a (1), there is no problem. Am I missing some config on the sessions or the commit?
System Information
Upvote & Fund