Closed oyed closed 3 years ago
I also make heavy use of Apollo Client and it's client-side caching, since this uses graphql-ws, would integrating the connection over the graphql-ws client work out-of-the-box if I were to move away from Apollo Server to subscriptionless?
Regardless, love what you're doing here - I've never found any good, working, well maintained Subscriptions over API Gatewat (Or serverless in general) :)
Hey @oyed thanks for getting involved!
Would it be possible to run it alongside an Apollo instance, purely to handle Subscription?
Totally - you can configure your client to use HTTP/S for queries and mutations (this is usually a default) 👍
My immediate thought was to just pass the same schema to createInstance that I do to Apollo, and use createInstance for the publish function via my existing Context.
That is exactly what I would recommend 🔥
I also make heavy use of Apollo Client and it's client-side caching, since this uses graphql-ws, would integrating the connection over the graphql-ws client work out-of-the-box
Check out the Apollo client example on the graphql-ws repo. The client side caching should be consistent regardless of what backend is being used for queries/mutations/subscriptions
Regardless, love what you're doing here
Thanks for the feedback - it means a lot! Definitely keep me posted if you encounter any issues or have any ideas for how this could be better!
From what I can gather from the README, this seems like it's a replacement to running a GraphQL Server, like Apollo, and executing Queries/Mutations over WebSocket as well.
Would it be possible to run it alongside an Apollo instance, purely to handle
Subscription
? My immediate thought was to just pass the same schema tocreateInstance
that I do to Apollo, and usecreateInstance
for thepublish
function via my existing Context.