@central-factory/graphql2sql
v0.0.1
Published
GraphQL to SQL Schema Generator. Currently supports PostgreSQL.
Downloads
2
Readme
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
}
);
})();