How to use the @gapi/core.GRAPHQL_PLUGIN_CONFIG 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 / app / app.module.js View on Github external
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);
                            }
                            else {
                                const m = require('esm')(module)(path_1.join(process.cwd(), external.file));
                                external.module = m['default'] || m;
                            }
                            core_1.Container.set(external.map, external.module);