graphene-ui currently has no JSON-RPC server support; it only contains RPC clients. Implement a JSON-RPC server class capable of taking method registrations and implementing them on a WebSocket object.
It's probably best to mirror the API of some existing javascript JSON-RPC server, such as that of json-rpc2. Unfortunately, existing JSON-RPC servers that I've found (including json-rpc2) do not apparently support arbitrary transport layers, thus cannot support a WebSocket object as the transport interface.