How to use subscription + apollo server 3 + koa?

According to the example in the document, I get the following things:

  • SubscriptionServer needs http.Server.
  • http.Server created by koa instance.
  • ApolloServer.getMiddleware requires called after the start.
  • ApolloServer needs the closure of SubscriptionServer.

It seems to constitute a circular dependency.

Is it possible to use apollo-server-koa with subscriptions-transport-ws? Or it must be used with express?

I would really appreciate it if someone could give me an example for that. :slight_smile:

I am also trying to use v3 of apollo-server-koa with subscriptions. Did you ever find a solution? Could you let me know which “example in the document” you are referencing?

Thanks!