# graphql-codegen-sqlmancer

> GraphQL Code Generator plugin for generating TypeScript types for Sqlmancer

Latest version **0.1.0** (published 2020-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install graphql-codegen-sqlmancer
pnpm add graphql-codegen-sqlmancer
yarn add graphql-codegen-sqlmancer
bun add graphql-codegen-sqlmancer
```

## 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.0 |
| Published | 2020-05-18 |
| First published | 2020-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 9 |
| Unpacked size | 252.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Daniel Rearden |
| Maintainers | danielrearden |

## Links

- npm: https://www.npmjs.com/package/graphql-codegen-sqlmancer
- Repository: https://github.com/danielrearden/typescript-sqlmancer
- Homepage: https://sqlmancer.netlify.com
- Issues: https://github.com/danielrearden/typescript-sqlmancer/issues
- npm.io page: https://npm.io/package/graphql-codegen-sqlmancer

## Dependencies (9)

- [tslib](https://npm.io/package/tslib.md) ~1.11.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [auto-bind](https://npm.io/package/auto-bind.md) ~4.0.0
- [sqlmancer](https://npm.io/package/sqlmancer.md) ^0.2.1
- [graphql-tools](https://npm.io/package/graphql-tools.md) ^5.0.1-ffb435a.0
- [@graphql-codegen/typescript](https://npm.io/package/@graphql-codegen/typescript.md) ^1.13.5
- [@graphql-codegen/plugin-helpers](https://npm.io/package/@graphql-codegen/plugin-helpers.md) 1.13.5
- [@graphql-codegen/typescript-resolvers](https://npm.io/package/@graphql-codegen/typescript-resolvers.md) ^1.13.5
- [@graphql-codegen/visitor-plugin-common](https://npm.io/package/@graphql-codegen/visitor-plugin-common.md) 1.13.5

## Recent versions

- 0.1.0 (latest) — 2020-05-18

## README

# Sqlmancer

### Conjure SQL from your GraphQL queries 🧙🔮✨

This is a [Graphql Code Generator](https://graphql-code-generator.com/) plugin for generating types for [Sqlmancer](https://sqlmancer.netlify.app).

### Installation

```sh
npm install --save-dev @graphql-codegen/cli typescript-sqlmancer
```

### Usage

Add a `codegen.yml` configuration file and point it to your type definitions:

```yml
schema: src/**/*.graphql
generates:
  path/to/file.ts:
    plugins:
      - graphql-codegen-sqlmancer
```

Then run the CLI command:

```
npx graphql-codegen
```

### Configuration

The plugin generates both a `SqlmancerClient` type to be used with Sqlmancer, as well as type definitions to be used in your resolvers. This plugin uses the `@graphql-codegen/typescript` and `@graphql-codegen/typescript-resolvers` under the hood to generate the resolver types. You can skip generating these types by setting `withResolvers` to false.

```yml
schema: src/**/*.graphql
generates:
  path/to/file.ts:
    plugins:
      - graphql-codegen-sqlmancer
    config:
      withResolvers: false
```

> NOTE: The plugin will compile your schema, including all transformations applied by Sqlmancer directives, before passing it to the `typescript` and `typescript-resolvers` plugins. These other plugins should not be used in addition to the Sqlmancer plugin -- doing so may result in the generator output not reflecting the final schema.

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