How to use the @graphql-modules/core.EventEmitterCommunicationBridge function in @graphql-modules/core

To help you get started, we’ve selected a few @graphql-modules/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Urigo / graphql-modules / examples / di / src / app.ts View on Github external
import {
  GraphQLApp,
  EventEmitterCommunicationBridge,
} from '@graphql-modules/core';
import { userModule } from './modules/user';
import { blogModule } from './modules/blog';
import { infoModule } from './modules/info';
import { InfoMock } from './modules/info/providers/info-mock';
import { Info } from './modules/info/providers/info';

const communicationBridge = new EventEmitterCommunicationBridge();

export const app = new GraphQLApp({
  modules: [
    infoModule.withConfig({
      version: 'v1.0.0',
    }),
    userModule,
    blogModule,
  ],
  communicationBridge,
  providers: [
    {
      provide: Info,
      useClass: InfoMock,
      overwrite: true,
    },