graphql-starter-kit

command module
v0.0.0-...-7967cdc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2016 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

GraphQL Starter Kit for GoLang

Golang implementation of a GraphQL server using Cassandra, MongoDB and REST backends inspired by Tutorial: How to build a GraphQL server.

Quick Start

Get the code:

go get github.com/nilstgmd/graphql-starter-kit

Start the Docker container running the GraphQL server, a container with Cassandra and a container with MongoDB (showterm.io):

cd  $GOPATH/src/github.com/nilstgmd/graphql-starter-kit/ && make all

Use the GraphiQL IDE in your browser http://localhost:8080/ or the API http://localhost:8080/graphql?query=... to execute queries against the server.

GraphiQL IDE

Example

Using GraphiQL:

{
  author(firstName:"Rob", lastName: "Pike"){
    firstName
    lastName
    posts{
      title
      views
    }
  }
  getFortuneCookie
}

Using cURL:

curl -XPOST http://localhost:8080/graphql \
-H 'Content-Type: application/graphql' \
-d 'query Root{ author(firstName:"Andrew",lastName:"Gerrand"){firstName,lastName,posts{title,views}},getFortuneCookie }'

Extra

Just because it is cool: Flamegraphs 🔥

Flamegraph

The GraphQL server offers a pprof endpoint which can be consumed to create flamegraphs with go-torch.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址