The actual HTTP server instance can be killed with server.close(callback), but I'm not sure what will happen with any pending WebSocket operations (mutations or queries being run through WebSockets). Since http.Server doesn't really know anything about the WebSocket operations, it probably ignores them. How to properly make sure that when SIGTERM is received, the server stops accepting new requests/webSocket connections, finishes the pending ones and then closes?
Couldn't really find anything about this with Google.