@graphback/runtime
GraphQL-Code-Generator compatibile schema generator
Last updated 7 years ago by aerogear-ci .
Apache-2.0 · Original npm · Tarball · package.json
$ npm install @graphback/runtime 
SYNC missed versions from official npm registry.

Graphback


Auto generate database structure,
GraphQL Resolvers and Queries from GraphQL types 🚀

Documentation: https://graphback.dev Repository: https://github.com/aerogear/graphback/

Graphback-Runtime

Autogenerated runtime layer for your schema. Graphback runtime can provide out of the box resolver and database layer for your application without writing any line of the code.

Usage

To use runtime capabilities developers will need to create data provider. Currently 2 data providers are supported:

  • KnexDBDataProvider
  • PgKnexDBDataProvider

Default data providers utilize knex.js library as it supports wider range of the databases out of the box and provides great developer experience.

Then developers can create runtime instance:

    const client = new Knex(...);
    const graphbackOptions = {...}
    const modelString = `type Test ...`
    
    // Create backend
    const backend = new GraphQLBackendCreator(modelString, graphbackOptions);
    const dbClientProvider = new PgKnexDBDataProvider(client);
    const runtime = await backend.createRuntime(dbClientProvider);
    console.log(runtime.schema,  runtime.resolvers)

Check our example application: https://github.com/aerogear/graphback/tree/master/examples/runtime-example

Usage with Generated resolvers

@graphback/codegen-resolvers package generates a resolver layer that utilizes the CRUD layer generated by the runtime framework. By default resolver layer will based on the crudService field attached to context. Developers can use the helper function createKnexRuntimeContext that will build default context for resolver layer.

See example app: https://github.com/aerogear/graphback/tree/master/examples/generator-fullstack

Running example

  • Start the database
docker-compose up -d
  • create database
graphback db
  • Start the server
npm start

Enjoy runtime app

Current Tags

  • 0.10.0-dev3                                ...           dev (7 years ago)
  • 0.15.0                                ...           latest (6 years ago)
  • 0.15.0-alpha1                                ...           next (6 years ago)

51 Versions

  • 0.15.0                                ...           6 years ago
  • 0.15.0-alpha1                                ...           6 years ago
  • 0.14.1                                ...           6 years ago
  • 0.14.0                                ...           6 years ago
  • 0.14.0-beta6                                ...           6 years ago
  • 0.14.0-beta5                                ...           6 years ago
  • 0.14.0-beta4                                ...           6 years ago
  • 0.14.0-beta3                                ...           6 years ago
  • 0.14.0-beta1                                ...           6 years ago
  • 0.14.0-alpha14                                ...           6 years ago
  • 0.14.0-alpha13                                ...           6 years ago
  • 0.14.0-alpha12                                ...           6 years ago
  • 0.14.0-alpha11                                ...           6 years ago
  • 0.14.0-alpha10                                ...           6 years ago
  • 0.14.0-alpha9                                ...           6 years ago
  • 0.14.0-alpha8                                ...           6 years ago
  • 0.14.0-alpha7                                ...           6 years ago
  • 0.14.0-alpha6                                ...           6 years ago
  • 0.14.0-alpha5                                ...           6 years ago
  • 0.14.0-alpha4                                ...           6 years ago
  • 0.14.0-alpha3                                ...           6 years ago
  • 0.12.1                                ...           6 years ago
  • 0.14.0-alpha2                                ...           6 years ago
  • 0.14.0-alpha1                                ...           6 years ago
  • 0.14.0-dev3                                ...           7 years ago
  • 0.14.0-dev2                                ...           7 years ago
  • 0.14.0-dev1                                ...           7 years ago
  • 0.12.0                                ...           7 years ago
  • 0.11.4                                ...           7 years ago
  • 0.11.3                                ...           7 years ago
  • 0.11.2                                ...           7 years ago
  • 0.11.1                                ...           7 years ago
  • 0.11.0                                ...           7 years ago
  • 0.11.0-rc6                                ...           7 years ago
  • 0.11.0-rc5                                ...           7 years ago
  • 0.11.0-rc4                                ...           7 years ago
  • 0.11.0-rc3                                ...           7 years ago
  • 0.11.0-rc2                                ...           7 years ago
  • 0.11.0-dev3                                ...           7 years ago
  • 0.11.0-dev2                                ...           7 years ago
  • 0.11.0-rc1                                ...           7 years ago
  • 0.11.0-alpha1                                ...           7 years ago
  • 0.10.2                                ...           7 years ago
  • 0.10.1                                ...           7 years ago
  • 0.10.0                                ...           7 years ago
  • 0.10.0-rc3                                ...           7 years ago
  • 0.10.0-dev3                                ...           7 years ago
  • 0.10.0-rc2                                ...           7 years ago
  • 0.10.0-rc1                                ...           7 years ago
  • 0.10.0-dev2                                ...           7 years ago
  • 0.1.0-dev2                                ...           7 years ago
Downloads
Total 111
Today 0
This Week 4
This Month 66
Last Day 0
Last Week 52
Last Month 45
Dependencies (4)
Dev Dependencies (10)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE