Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
throw new Error('No `schemaPath` found in GraphQL config file.')
}
const relativeSchemaPath = relative(process.cwd(), schemaPath)
if (!existsSync(schemaPath)) {
console.log(
chalk.yellow("Schema file doesn't exist at ") +
chalk.blue(relativeSchemaPath),
)
return
}
const extensions = {
schemaPath: relativeSchemaPath,
...getSchemaExtensions(schemaPath),
}
const maxLength = _(extensions)
.keys()
.map('length')
.max()
for (let name in extensions) {
const padName = _.padStart(name, maxLength)
console.log(`${padName}\t${chalk.blue(extensions[name])}`)
}
if (Object.keys(extensions).length === 0) {
return
}
}