Conversation
src/WebSocketSubscriptionServer.ts
Outdated
| } | ||
|
|
||
| class GraphQLSocket extends EventEmitter { | ||
| protocol: 'graphql-transport-ws' | 'socket-io'; |
There was a problem hiding this comment.
The plan is to support: GraphQL over websockets protocol next
There was a problem hiding this comment.
i am a little confused, this GraphQLSocket only seems to be used by the websocket, so why have the socket-io protocol as an allowed value?
There was a problem hiding this comment.
yeah sorry. So in this case "socket-io" is really "4C's bespoke protocol of connect and authenticate calls" I don't remember why i named it "socket-io" maybe just because it depends on the socket-io handshake events
There was a problem hiding this comment.
and by "I named it" what do you mean by that? where is this name specified? do you think it's too late to change? maybe we can add a comment to avoid confusion
There was a problem hiding this comment.
it's made up by me. this theoretically supposed to match the web socket sub protocol. 'socket-io' is a subprotocol used by socket-io which is why i just named it that for the pure web socket but it's not actually that protocol so i should disambiguate and name it 4c-subscription-server
src/SocketIOSubscriptionServer.ts
Outdated
| this.io.on('connection', (socket: io.Socket) => { | ||
| const request = Object.create((express as any).request); | ||
| Object.assign(request, socket.request); | ||
| this.opened( |
There was a problem hiding this comment.
onOpenConnection or initConnection
src/WebSocketSubscriptionServer.ts
Outdated
| } | ||
|
|
||
| class GraphQLSocket extends EventEmitter { | ||
| protocol: 'graphql-transport-ws' | 'socket-io'; |
There was a problem hiding this comment.
i am a little confused, this GraphQLSocket only seems to be used by the websocket, so why have the socket-io protocol as an allowed value?
Adds an option for a pure websocket server.