@phartenfeller/tuql
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

@phartenfeller/tuql

Fork of tuql without CLI but usable as a library.

Example implementation:

import initGraphQLServer from '@phartenfeller/tuql';
import express from 'express';
import cors from 'cors';
import graphqlHTTP from 'express-graphql';

async function main() {
  const app = express();

  const schema = await initGraphQLServer({
    filePath: './testUtils/chinook.db',
    mutations: false
  });

  app.use(
    '/graphql',
    cors(),
    graphqlHTTP({
      schema,
      graphiql: true,
    })
  );

  app.listen(4000, () =>
    console.log(` > Running at http://localhost:${4000}/graphql`)
  );
}

main();

Readme

Keywords

Package Sidebar

Install

npm i @phartenfeller/tuql

Weekly Downloads

0

Version

0.0.7

License

MIT

Unpacked Size

98.2 kB

Total Files

72

Last publish

Collaborators

  • phartenfeller