Closed
Description
Each DSL operation calls self.client.execute
which apparently creates a new connection each time. Passing a session
to DSLSchema
doesn't work and causes an infinite recursion.
Traceback (most recent call last):
File "gql_test2.py", line 45, in <module>
query = ds.Query.listCasess().select(ds.ModelCasesConnection.items.select(ds.Cases.id))
File "C:\Program Files\Python38\lib\site-packages\gql\dsl.py", line 38, in __getattr__
type_def = self.schema.get_type(name)
File "C:\Program Files\Python38\lib\site-packages\gql\dsl.py", line 38, in __getattr__
type_def = self.schema.get_type(name)
File "C:\Program Files\Python38\lib\site-packages\gql\dsl.py", line 38, in __getattr__
type_def = self.schema.get_type(name)
[Previous line repeated 996 more times]
RecursionError: maximum recursion depth exceeded
Is there some known good way to reuse the connection when using DSL? Is the session
meant to work, and this is simply a bug?