Coder Social home page Coder Social logo

graphene-1's Introduction

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:

integration Package
Sequelize On 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";

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

graphene-1's People

Contributors

syrusakbary avatar nevir avatar

Watchers

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.