Simple yet Powerful
Graphene-JS is a Javascript library that allows you to easily build GraphQL API's. Inspired by Graphene-Python, the main goal of Graphene-JS is to provide a simple and extensible API for building GraphQL schemas.
But, what is GraphQL? GraphQL is a data query language developed internally by Facebook in 2012 before being publicly released in 2015. It provides an alternative to REST and ad-hoc webservice architectures.
We believe that GraphQL is the next big thing after peanut butter and REST.
import { ObjectType, Field, Schema } from "graphene-js";
@ObjectType()
class Query {
@Field(String)
hello() {
return "Hello world!";
}
}
const schema = new Schema({query: Query});
schema.execute(`query { hello }`)