# schema-to-graphql

> convert nexus schema to graphql

Latest version **0.1.1** (published 2021-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install schema-to-graphql
pnpm add schema-to-graphql
yarn add schema-to-graphql
bun add schema-to-graphql
```

Provides the command `stg`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2021-12-28 |
| First published | 2021-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 28.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | prugehada |
| Maintainers | cljames |
| Keywords | graphql schema, graphql, convert, nexus |

## Links

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

## Dependencies (5)

- [yargs](https://npm.io/package/yargs.md) ^17.3.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [graphql](https://npm.io/package/graphql.md) ^16.2.0
- [query-ast](https://npm.io/package/query-ast.md) ^1.0.4
- [comment-json](https://npm.io/package/comment-json.md) ^4.1.1

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2021-12-28
- 0.1.0 — 2021-12-28
- 0.0.6 — 2021-12-28
- 0.0.5 — 2021-12-28
- 0.0.4 — 2021-12-28
- 0.0.3 — 2021-12-27
- 0.0.2 — 2021-12-27
- 0.0.1 — 2021-12-27

## README

# schema-to-graphql
After reading the schema file of nexus, it creates a graphql file.

## install
```js
yarn add -D schema-to-graphql
```

## usage

> Create a stg.json file in root.
> schema: generated nexus schema file
> dest: destination folder for graphql


```js
{
  "overwrite": false,
  "schema": "./test/schema.graphql",
  "dest": "./test/gql",
  "alias": {
    "Post": ["Draft"]
  }
}
```

## command

```js
npx stg [--config stg.json]
```

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