How to use the @gapi/core.Module function in @gapi/core

To help you get started, we’ve selected a few @gapi/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 rxdi / graphqj / src / app / app.module.ts View on Github external
buildSchema,
  mergeSchemas,
  GRAPHQL_PLUGIN_CONFIG,
  GraphQLDirective,
  Container
} from '@gapi/core';

import { TypesToken, Config, IsBundlerInstalled } from './app.tokens';

import { TranspileAndLoad } from '../helpers/transpile-and-load';
import { buildExternals } from '../helpers/dynamic-schema/mutators/build-externals';
import { CoreModule } from './core/core.module';
import { ClientModule } from './client/client.module';
import { predictConfig } from '../helpers/component.parser';

@Module({
  imports: [CoreModule, VoyagerModule.forRoot(), ClientModule],
  providers: [
    {
      provide: TypesToken,
      useValue: new Map()
    },
    {
      provide: IsBundlerInstalled,
      useValue: { parcel: false, gapi: false }
    },
    {
      provide: SCHEMA_OVERRIDE,
      useFactory: () => (schema: GraphQLSchema) => {
        let externalSchema;
        try {
          const config = JSON.parse(