Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (18 sloc) 502 Bytes
title
Meteor

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

import { WebApp } from 'meteor/webapp';
import { execute, subscribe } from 'graphql';
import { SubscriptionServer } from 'subscriptions-transport-ws';
import { myGraphQLSchema } from './my-schema';

new SubscriptionServer({
  schema: myGraphQLSchema,
  execute,
  subscribe,
}, {
  server: WebApp.httpServer,
  path: '/subscriptions',
});
You can’t perform that action at this time.