Skip to content

Sample code for a GraphQL server using juniper + hyper

Notifications You must be signed in to change notification settings

aisrael/juniper-hyper-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

juniper-hyper-demo

An example project built in Rust demonstrating juniper and hyper.

To run

$ cargo run
  .
  .
  .
Listening on http://127.0.0.1:3000

Or, alternatively, to build and run a release build

$ cargo run --release
  .
  .
  .
Listening on http://127.0.0.1:3000

To test

$ curl -X POST -d @request.json http://localhost:3000/graphql
{
  "data": {
    "user": {
      "name": "name",
      "email": "name@example.com"
    }
  }
}

To benchmark

Using Apache bench, ab:

$ ab -p request.json -c 10 -n 1000 127.0.0.1:3000/graphql

Building the Docker image

$ docker build -t juniper-hyper-demo .

(Warning: can take up to 45 minutes for a release build.)

About

Sample code for a GraphQL server using juniper + hyper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published