Giter Club home page Giter Club logo

graphfront's Introduction

Graphfront

Use a 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.

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 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 BSD-licensed.

graphfront's People

Contributors

samerbuna avatar

Watchers

spigity avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.