-
I have a project where I want to implement Apollo GrapQL Subscriptions through Websockets (of course 😄 ) using the Serverless framework on AWS. I read some issues about this here but I didn't find a solution or example about this type of setup 😢 . I did a few things that got me closer to the setup but I still have some blockers. I did the connection part and now the client is sending this message through Websockets: {"type":"connection_init","payload":{"Authorization":"Bearer my-token"}} But when working with Serveless framework on AWS we have to send (as per docs) a message that contains the I am thinking I just a few things:
But I am stuck here. Is there an example project with a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Furthermore, this library is a reference implementation of the GraphQL over WebSocket protocol and is therefore required to have the messages format comply with the protocol; so, no, However, I am aware of two libraries of intereset that aim to integrate the GraphQL over WebSocket protocol on AWS: |
Beta Was this translation helpful? Give feedback.
graphql-ws
's server implementation is actually just a coercing API that can be plugged into any WebSocket server library by usingmakeServer
. Check out the built-ins forws
,uWebSockets
andfastify-websocket
to get started.Furthermore, this library is a reference implementation of the GraphQL over WebSocket protocol and is therefore required to have the messages format comply with the protocol; so, no,
graphql-ws
will not accept messages differing from the protocol.However, I am aware of two libraries of intereset that aim to integrate the GraphQL over WebSocket protocol on AWS:
subscriptionless
graphql-lambda-subscriptions