File tree Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change 11Release type: patch
22
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 2929)
3030
3131
32+ def custom_context_dependency () -> str :
33+ return "Hi!"
34+
35+
3236async def litestar_get_context (request : Request = None ):
3337 return get_context ({"request" : request })
3438
Original file line number Diff line number Diff line change 3030from tests .http .clients .base import DebuggableGraphQLTransportWSHandler
3131from tests .views .schema import MyExtension , Schema
3232
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-
4833if TYPE_CHECKING :
49- from ..http .clients .base import HttpClient
34+ from ..http .clients .base import HttpClient , WebSocketClient
5035
5136
5237@pytest_asyncio .fixture
@@ -912,6 +897,9 @@ async def test_error_handler_for_timeout(http_client: HttpClient):
912897
913898 if isinstance (http_client , ChannelsHttpClient ):
914899 pytest .skip ("Can't patch on_init for this client" )
900+
901+ if not AsyncMock :
902+ pytest .skip ("Don't have AsyncMock" )
915903
916904 ws = ws_raw
917905 handler = None
You can’t perform that action at this time.
0 commit comments