fix(subs): allow additional server variations (e.g., Tls, Http2)#4200
Conversation
|
@braineo: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
|
Seems like we should check for |
|
Hi @jedwards1211 I have not checked if https or http2 server are supported. Just reading from the function signature typing and seems it only take import { Server as HttpServer } from 'http';
/// code
public installSubscriptionHandlers(server: HttpServer | WebSocket.Server) |
|
@abernix I'm guessing when using just JS it's possible to pass an |
|
@jedwards1211 Let me know what do you think. Should be easy to add. |
|
Ok I added type of http2 servers too. Just alternatively I used As for the CI, it says I am not sure if it is a bug or just time out |
41ad161 to
5a8753d
Compare
|
Seems the master branch is failing the same test and probably not introduced by this PR. Would you review or comment anything so that we can merge this PR soon please? |
|
? |
|
Unintentional closing! Please stand-by: #4304 |
|
gotcha, I see hump day decided to celebrate for you |
abernix
left a comment
There was a problem hiding this comment.
I think this looks good, but can we write a number of test cases that exercise these types of servers with installSubscriptionHandlers?
|
@abernix where will be the best place to add? inside createApolloServer({
typeDefs,
resolvers,
}).then(({ port, server, httpServer }) => {
server.installSubscriptionHandlers(httpServer); |
|
I added test for websocket server. |
|
@abernix Ping |
|
@abernix Ping |
fix #4198
Refer to discussion in the issue please.