How to use the @gapi/core.printSchema 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
}
                    catch (e) { }
                    const schemas = [externalSchema, schema].filter(i => !!i);
                    let mergedSchemas;
                    if (schemas.length === 1) {
                        mergedSchemas = schema;
                    }
                    else {
                        mergedSchemas = core_1.mergeSchemas({
                            schemas
                        });
                    }
                    if (args_extractors_1.includes('--verbose')) {
                        console.log(`
Schema:
${core_1.printSchema(mergedSchemas)}
                  `);
                    }
                    if (process.argv.toString().includes('--generate')) {
                        util_1.promisify(fs_1.writeFile)('./schema.graphql', core_1.printSchema(mergedSchemas), {
                            encoding: 'utf-8'
                        }).then(() => {
                            console.log('Schema created!');
                            process.exit(0);
                        });
                    }
                    else {
                        console.log('You can extract this schema by running --generate command');
                    }
                    return mergedSchemas;
                }
            },
github rxdi / graphqj / src / app / app.module.ts View on Github external
}
        } catch (e) {}
        const schemas = [externalSchema, schema].filter(i => !!i);
        let mergedSchemas: GraphQLSchema;
        if (schemas.length === 1) {
          mergedSchemas = schema;
        } else {
          mergedSchemas = mergeSchemas({
            schemas
          });
        }

        if (includes('--verbose')) {
          console.log(`
Schema:
${printSchema(mergedSchemas)}
                  `);
        }

        if (process.argv.toString().includes('--generate')) {
          promisify(writeFile)('./schema.graphql', printSchema(mergedSchemas), {
            encoding: 'utf-8'
          }).then(() => {
            console.log('Schema created!');
            process.exit(0);
          });
        }
        return mergedSchemas;
      }
    },
github rxdi / graphqj / src / app / client / client.controller.ts View on Github external
getViewsConfig(views?: ConfigViews) {
    const config = Container.get('main-config-compiled');
    return {
      components: config.$components,
      views: viewsToArray(views || config.$views),
      schema: printSchema(Container.get(BootstrapService).schema)
    };
  }