0.1.5 • Published 6 years ago

graphene-fork v0.1.5

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

Graphene-JS Build Status PyPI version Coverage Status

Graphene-JS is a JS framework for building GraphQL schemas/types fast and easily.

  • Easy to use: Graphene helps you use GraphQL in Javascript without effort.
  • Relay: Graphene has builtin support for Relay. (on the works)
  • Data agnostic: Graphene supports any kind of data source: SQL (Sequelize), NoSQL, custom objects, etc. We believe that by providing a complete API you could plug Graphene-JS anywhere your data lives and make your data available through GraphQL.

Integrations

Graphene has multiple integrations with different frameworks:

integrationPackage
SequelizeOn the works!

Also, Graphene is fully compatible with the GraphQL spec, working seamlessly with all GraphQL clients, such as Relay, Apollo and gql.

Installation

For instaling graphene, just run this command in your shell

npm install --save graphene-js

Examples

Here is one example for you to get started:

import * as graphene from "graphene-js";

class Query extends graphene.ObjectType {
  static fields = {
    hello: new graphene.String()
  };

  hello() {
    return "Hello world!";
  }
}

const schema = new Schema(Query);

Then Querying graphene.Schema is as simple as:

query = `
    query SayHello {
      hello
    }
`
var result = await schema.execute(query)

If you want to learn even more, you can also check the following examples:

Contributing

After cloning this repo, ensure dependencies are installed by running:

npm i

After developing, the full test suite can be evaluated by running:

npm test

Documentation

On the works