@central-factory/graphql2sql
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

graphql2sql

GraphQL to SQL Schema Generator. Currently supports PostgreSQL.

Usage

See examples folder for a complete use case

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
    }
  );

})();

Readme

Keywords

none

Package Sidebar

Install

npm i @central-factory/graphql2sql

Weekly Downloads

3

Version

0.0.1

License

none

Unpacked Size

60.5 kB

Total Files

23

Last publish

Collaborators

  • aitorllj93