0.3.1 • Published 6 years ago

graphfront v0.3.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Graphfront

Use a PostgreSQL database schema information to generate a GraphQL schema.

This is a work-in-progress project. It requires a super recent version of Node.js and using it in production is not recommended.

Build Status npm version

Getting Started

An overview of GraphQL in general is available in the README for the Specification for GraphQL.

Using Graphfront

Install Graphfront from npm

npm install --save graphfront

Graphfront provides two important capabilities: generating a GraphQL schema, and exposing an HTTP handler to server requests for that schema.

First, generate a GraphQL schema based on a database schema.

import { generator } from 'graphfront';

const { getSchema } = generator(dbPool, apiKeyValidator);

This defines a function that can be invoked to generate a schema.

Or you can use request handler that automatically generates the schema

const graphfront = require('graphfront');

const graphfrontHTTP = graphfront({
  dbPool,
  apiKeyValidator: (apiKey) => apiKey === 'SuperSecretKey'
});

app.use('/my-api', graphfrontHTTP);

Contributing

We actively welcome pull requests, learn how to contribute.

Changelog

Changes are tracked as Github releases.

License

graphfront is MIT licensed.

0.3.1

6 years ago

0.3.0

6 years ago

0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago