0

I see for Apollo graphql if i wan to use plain Apollo subscription, I can import PubSub from Apollo-server or graphql-subscription . Wondering which one is correct to use ?

CoolOS
  • 91
  • 9

1 Answers1

0

Take look at the dependencies of apollo-server.

graphql-subscriptions is the dependency of apollo-server.

apollo-server just re-exports all modules from graphql-subscriptions without modifying anything.

So, you can import PubSub from any package. They are the same.

Lin Du
  • 88,126
  • 95
  • 281
  • 483
  • Thanks . I have that in place . Not sure I see subscribe method is never called when I try from playground . In fact it’s not staying in listening mode . – CoolOS Jul 21 '20 at 01:48