# @graphql-schema/validate-schema

> Parse & validate a GraphQL Schema and throw clear errors if anything is wrong.

Latest version **1.0.1** (published 2020-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @graphql-schema/validate-schema
pnpm add @graphql-schema/validate-schema
yarn add @graphql-schema/validate-schema
bun add @graphql-schema/validate-schema
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-04-24 |
| First published | 2020-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 159.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Forbes Lindesay |
| Maintainers | forbeslindesay |

## Links

- npm: https://www.npmjs.com/package/@graphql-schema/validate-schema
- Repository: https://github.com/ForbesLindesay/graphql-schema
- Homepage: https://github.com/ForbesLindesay/graphql-schema#readme
- Issues: https://github.com/ForbesLindesay/graphql-schema/issues
- npm.io page: https://npm.io/package/@graphql-schema/validate-schema

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^3.0.0
- [graphql](https://npm.io/package/graphql.md) ^14.6.0
- [@babel/code-frame](https://npm.io/package/@babel/code-frame.md) ^7.8.3
- [@graphql-schema/error](https://npm.io/package/@graphql-schema/error.md) 1.0.0
- [@graphql-schema/federation-spec](https://npm.io/package/@graphql-schema/federation-spec.md) 1.0.0

## Recent versions

- 1.0.1 (latest) — 2020-04-24
- 1.0.0 — 2020-03-15

## README

# @graphql-schema/validate-schema

Parse & validate a GraphQL Schema and throw clear errors if anything is wrong.

## Installation

```
yarn add @graphql-schema/validate-schema
```

## Usage

```ts
import validateSchema, {
  validateSchemaFile,
} from '@graphql-schema/validate-schema';

validateSchemaFile('./my-schema.graphql');
validateSchema('query { login: String! }');
```

### Federated Schemas

```ts
import validateSchema, {
  validateSchemaFile,
} from '@graphql-schema/validate-schema';

validateSchemaFile('./my-schema.graphql', {isFederated: true});
validateSchema('query { login: String! }', {isFederated: true});
```

---
_Source: https://npm.io/package/@graphql-schema/validate-schema · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
