How to use the @gapi/core.BootstrapService 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 / lib / helpers / watch-bundles.js View on Github external
chokidar_1.watch([...new Set(paths)], { ignored }).on('change', (path) => __awaiter(this, void 0, void 0, function* () {
        const newModule = yield load_file_1.loadFile(path);
        yield traverse_1.traverseAndLoadConfigs(config);
        const schema = core_1.Container.get(core_1.BootstrapService).schema;
        schema.getQueryType().getFields()['findUser2'].resolve = newModule.findUser;
    }));
}
github rxdi / graphqj / lib / app / app.module.js View on Github external
useFactory: () => __awaiter(this, void 0, void 0, function* () {
                    let config = yield set_config_1.getConfig(args_extractors_1.nextOrDefault('--config', 'graphqj-config'));
                    if (!config) {
                        config = yield set_config_1.getConfig('gj');
                    }
                    if (!config) {
                        config = basic_template_1.basicTemplate;
                    }
                    return config['default'] || config;
                })
            },
            {
                provide: 'Run',
                deps: [
                    app_tokens_1.Config,
                    core_1.BootstrapService,
                    app_tokens_1.TypesToken,
                    app_tokens_1.ResolversToken,
                    app_tokens_1.ArgumentsToken,
                    app_tokens_1.GuardsToken,
                    core_1.GRAPHQL_PLUGIN_CONFIG
                ],
                lazy: true,
                useFactory: (config, bootstrap, types, resolvers, args, guards, graphqlConfig) => __awaiter(this, void 0, void 0, function* () {
                    config = yield config;
                    yield traverse_1.traverseAndLoadConfigs(config);
                    if (config.$externals) {
                        const compiledPaths = yield transpile_and_load_1.TranspileAndGetAll(config.$externals, './.gj/out');
                        config.$externals = compiledPaths.map(external => {
                            if (external.file.includes('.ts')) {
                                external.module = require(external.transpiledFile);
                            }