How to reuse connection when using DSL?
See original GitHub issueEach 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?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
How to Extend DSL Service Line & Relocate Your Router
... and how to connect the wiring. Is your Wi-Fi signal weak or intermittent? The location of your router is likely part of...
Read more >14 Useful Ways to Reuse an Old Router (Don't Throw It Away!)
Whatever the case, your old router or modem/router combi unit can be reused. We've identified 14 new uses for old routers: Wireless repeater. ......
Read more >Clojure Guides: java.jdbc - How to reuse database connections
Since you rarely want every database operation to create a new connection, there are two ways to reuse connections: Grouping Operations using ......
Read more >Performance degradation when reusing DSLContext in jooq
//Method call try (Connection c = dataSource.getConnection()) { DSLContext dsl = DSL.using(c); return ...
Read more >10.3.5. Establishing a DSL Connection Red Hat Enterprise ...
You can configure a new DSL connection by opening the Network Connections window, clicking the Add button and selecting DSL from the Hardware...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in v3.0.0a5
I refactored the DSL code and the proposed way is a little bit different. Example: