Meteor exposes httpServer server over a meteor/web package, so you can use it the same way as any other http server:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { WebApp } from 'meteor/webapp';

const pubsub = new PubSub();
const subscriptionManager = new SubscriptionManager({
schema: myGraphQLSchema,
pubsub: pubsub,
});

new SubscriptionServer({
subscriptionManager: subscriptionManager,
}, {
server: WebApp.httpServer,
path: '/subscriptions',
});
Edit on GitHub