Skip to content

mikethebeer/graphql-crate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-crate

This repo demonstrates how a GraphQL middleware server can be used to run queries against Crate DB.

Setup and prerequisites

This project uses buildout to manage its dependencies. The only thing you need is a working python >= 2.7 installed.

python bootstrap.py
bin/buildout -N
bin/npm install

If you haven't used buildout and installed npm globally you can simply run:

npm install

npm is going to install you the required dependencies for running the GraphQL middleware server. These packages are listed below:

  • graphql, the reference implementation of GraphQL in JS
  • express, a minimalist web framework
  • express-graphql, the HTTP server for exposing GraphQL
  • crate-js, a node.js driver for Crate
  • q, the promise library for node

Run

If your environment setup is successful the middleware can be started:

bin/node index.js

This will start the GraphQL server and the HTTP endpoint is set to http://localhost:3000/graphql. If you open this URL in a browser you are able to run GraphQL-queries with the interactive in-browser Graphiql IDE.

About

Graphql Demo using Crate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published