Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Wonder-Technology/Wonder-bs-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bs-graphql

npm version

BuckleScript binding for graphql-js.

Installation

Since you can only have one instance type of graphql schema in your dependency tree, we leave you the discretion of managing the graphql package yourself.

npm install --save graphql bs-graphql
# or
yarn add graphql bs-graphql

As always, you will need to indicate to BuckleScript that the binding is available.

bsconfig.json

{
  ...
  "bs-dependencies": [
    "bs-graphql"
  ]
}

Usage

WARNING: This package has been published so far with the only goal of being usable for simple graphql server development. For now, you can only count on graphql and buildSchema functions alongside a sugared call to graphql: run. You are obviously welcome to contribute any other missing part!

You can use this binding to build and execute some simple GraphQL schemas:

let schema = GraphQL.Utilities.buildSchema "type Query { me: User } type User { name: String }";
let rootValue = {"me": fun () => {"name": "reason"}};
Js.log (GraphQL.run schema ::rootValue "{ me { name } }");

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages