# @central-factory/graphql2sql

> GraphQL to SQL Schema Generator. Currently supports PostgreSQL.

Latest version **0.0.1** (published 2019-11-25) · 0 weekly downloads

## Install

```sh
npm install @central-factory/graphql2sql
pnpm add @central-factory/graphql2sql
yarn add @central-factory/graphql2sql
bun add @central-factory/graphql2sql
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-11-25 |
| First published | 2019-11-25 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 59.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | aitorllj93 |

## Links

- npm: https://www.npmjs.com/package/@central-factory/graphql2sql
- npm.io page: https://npm.io/package/@central-factory/graphql2sql

## Dependencies (13)

- [path](https://npm.io/package/path.md) ^0.12.7
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [graphql](https://npm.io/package/graphql.md) ^14.5.8
- [ts-node](https://npm.io/package/ts-node.md) ^8.5.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [camelcase](https://npm.io/package/camelcase.md) ^5.3.1
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.1
- [typescript](https://npm.io/package/typescript.md) ^3.7.2
- [@types/node](https://npm.io/package/@types/node.md) ^12.12.12
- [@types/debug](https://npm.io/package/@types/debug.md) ^4.1.5
- [graphql-tools](https://npm.io/package/graphql-tools.md) ^4.0.6
- [@types/fs-extra](https://npm.io/package/@types/fs-extra.md) ^8.0.1
- [@types/cli-table](https://npm.io/package/@types/cli-table.md) ^0.3.0

## Recent versions

- 0.0.1 (latest) — 2019-11-25

## README

# graphql2sql

GraphQL to SQL Schema Generator. Currently supports PostgreSQL.

## Usage

See **examples** folder for a complete use case

```ts
import { readFile } from 'fs-extra';
import { join } from 'path';

import { load } from '../src/public_api';

(async () => {

  const someSQLBefore = await readFile(join(__dirname, 'headers.sql'), 'utf8');

  const content = await load(
    join(__dirname, 'schema'),
    null, // join(__dirname, 'out.sql')
    {
      databaseName: 'test',
      tablePrefix: 't',
      headers: someSQLBefore
    }
  );

})();
```

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