You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FastAPI WebSocket instance differs between handler and Dishka #574
When WebSocket is accepted in the handler, the instance provided by dishka remains unaccepted because they are different objects.
At the same time if you try to send a message using the instance provided by Dishka, it will raise an err.
solution is taking dishka websocket instance in handler
@router.websocket("/")@injectasyncdefws(
_: WebSocket, # hack from #575ws: FromDishka[WebSocket],
) ->None:
Activity
ApusBerliozi commentedon Jul 25, 2026
Hey everyone!
Would like to work on this one