graphback
v1.1.2
Published
Auto generate resolvers on top of the graphql and database of your choice
Downloads
773
Readme
Graphback
Motivation
Graphback helps you to kickstart your experience with any existing GraphQL implementation by generating backend and client side CRUD layer using your GraphQL data model.
Documentation: https://graphback.dev
Repository: https://github.com/aerogear/graphback/
Usage
graphback
provides a programmatic API for the Graphback ecosystem.
In most of the cases you can use graphback by utilizing graphback-cli package that will expose all useful commands and cover most of the use cases.
Install with npm:
npm install graphback
Install with yarn:
npm install graphback
buildGraphbackAPI
will process your schema and generate a CRUD API with schema, resolvers, services and data sources.
import { buildGraphbackAPI } from 'graphback';
import { createKnexDbProvider } from '@graphback/runtime-knex';
import Knex from 'knex';
const db = Knex({...});
const { typeDefs, resolvers, contextCreator } = buildGraphbackAPI(schema, {
dataProviderCreator: createKnexDbProvider(db)
});
Up-to-date usage and configuration information is covered in depth over on our website graphhback.dev.