How to use the graphql-schema-linter.runner.run function in graphql-schema-linter

To help you get started, we’ve selected a few graphql-schema-linter 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 Urigo / graphql-cli / src / cmds / lint.ts View on Github external
export async function handler(context: Context) {
  const { schemaPath } = await context.getProjectConfig()

  const exitCode = runner.run(process.stdout, process.stdin, process.stderr, [
    '',
    '',
    schemaPath,
  ])

  if (exitCode !== 0) {
    throw new Error('Linting errors were found')
  }
}

graphql-schema-linter

Command line tool and package to validate GraphQL schemas against a set of rules.

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis

Similar packages