How to use the @gapi/core.CoreModule.forRoot 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 / main.ts View on Github external
const imports = [];
    if (file && file.$imports) {
      const transpiledModules = await TranspileAndGetAll(
        file.$imports.map(file => ({ file: file.replace('💉', '') } as Externals)),
        'imports'
      );
      imports.push(
        ...transpiledModules.map(f => getFirstItem(require(f.transpiledFile)))
      );
    }
    if (file && file.$components) {
      await transpileComponentsInit(file.$components as string[]);
    }
    BootstrapFramework(AppModule, [
      ...imports,
      CoreModule.forRoot({
        graphql: {
          openBrowser: nextOrDefault('--random', true, v =>
            v === 'true' ? false : true
          ),
          buildAstDefinitions: false, // Removed ast definition since directives are lost,
          graphiQlPath: '/graphiql',
          graphiqlOptions: {
            endpointURL: '/graphiql'
          }
        },
        pubsub: {
          authentication: 'pubsub-auth'
        },
        server: {
          randomPort: nextOrDefault('--random', false),
          hapi: {