ZeferiniX
08/13/2021, 9:48 AMapollo-server-express
is used as a middleware on the express app
thanks to that, I can intercept the requests via middlewares and can make use of the node sdk if they go through plain http requestsrp
08/13/2021, 9:48 AMZeferiniX
08/13/2021, 9:49 AMZeferiniX
08/13/2021, 9:50 AMZeferiniX
08/13/2021, 9:50 AMres
object which the sdk needs 🤷♂️rp
08/13/2021, 9:51 AMZeferiniX
08/13/2021, 9:52 AMrp
08/13/2021, 9:52 AMZeferiniX
08/13/2021, 9:53 AMsubscriptions-transport-ws
, is via the onConnect
rp
08/13/2021, 9:54 AMrp
08/13/2021, 9:54 AMonConnect
is called as a result of a http request?ZeferiniX
08/13/2021, 9:55 AMZeferiniX
08/13/2021, 9:55 AMrp
08/13/2021, 9:55 AMrp
08/13/2021, 9:55 AMZeferiniX
08/13/2021, 10:01 AMsocket
- the WebSocket object from the ws
libZeferiniX
08/13/2021, 10:01 AMrequest
object of type IncomingMessage
from the http
lib 🤔ZeferiniX
08/13/2021, 10:03 AMcontext
object on line 97?rp
08/13/2021, 10:04 AMZeferiniX
08/13/2021, 10:05 AMZeferiniX
08/13/2021, 10:05 AMcontext
on every requestrp
08/13/2021, 10:10 AMrp
08/13/2021, 10:12 AMonConnect
functions "understands" the type you have made? So my question here is, what is the return type of the onConnect
function?ZeferiniX
08/13/2021, 10:16 AMonConnect
function becomes the graphql context object of the graphql subscription resolverZeferiniX
08/13/2021, 10:18 AMreq
and res
objects when working with graphql subscriptions, thus the Omit<T>
rp
08/13/2021, 10:18 AMZeferiniX
08/13/2021, 10:18 AMreq
objectZeferiniX
08/13/2021, 10:18 AMrp
08/13/2021, 10:19 AMZeferiniX
08/13/2021, 10:19 AMhttp
ZeferiniX
08/13/2021, 10:19 AMhttp