File tree 3 files changed +9
-18
lines changed 3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change 1
1
Release type: patch
2
2
3
- Operations over ` graphql-transport-ws ` now create the Context and perform validation on
4
- the worker ` Task ` , thus not blocking the websocket from accepting messages.
3
+ Fix error handling for query operations over graphql-transport-ws
Original file line number Diff line number Diff line change 29
29
)
30
30
31
31
32
+ def custom_context_dependency () -> str :
33
+ return "Hi!"
34
+
35
+
32
36
async def litestar_get_context (request : Request = None ):
33
37
return get_context ({"request" : request })
34
38
Original file line number Diff line number Diff line change 30
30
from tests .http .clients .base import DebuggableGraphQLTransportWSHandler
31
31
from tests .views .schema import MyExtension , Schema
32
32
33
- from ..http .clients .base import WebSocketClient
34
-
35
- try :
36
- from ..http .clients .fastapi import FastAPIHttpClient
37
- except ImportError : # pragma: no cover
38
- FastAPIHttpClient = None
39
- try :
40
- from ..http .clients .starlite import StarliteHttpClient
41
- except ImportError : # pragma: no cover
42
- StarliteHttpClient = None
43
- try :
44
- from ..http .clients .litestar import LitestarHttpClient
45
- except ImportError : # pragma: no cover
46
- LitestarHttpClient = None
47
-
48
33
if TYPE_CHECKING :
49
- from ..http .clients .base import HttpClient
34
+ from ..http .clients .base import HttpClient , WebSocketClient
50
35
51
36
52
37
@pytest_asyncio .fixture
@@ -912,6 +897,9 @@ async def test_error_handler_for_timeout(http_client: HttpClient):
912
897
913
898
if isinstance (http_client , ChannelsHttpClient ):
914
899
pytest .skip ("Can't patch on_init for this client" )
900
+
901
+ if not AsyncMock :
902
+ pytest .skip ("Don't have AsyncMock" )
915
903
916
904
ws = ws_raw
917
905
handler = None
You can’t perform that action at this time.
0 commit comments