graphql_test

command module
v0.0.0-...-b3dc69a Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2016 License: MIT Imports: 4 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_test CircleCI

Simple Golang based GraphQL endpoint test using graphql-go, graphiql, and a MySQL database

Quick start

Install the database script in your MySQL database:

mysql -u USERNAME starwars < starwars.sql

Set the following environment variables for database connectivity:

To test, navigate to http://localhost:8080 in your browser to see the excellent GraphiQL interface and submit queries that way. (Sidenote: Need to customize where the GraphiQL interface points to? Just adjust the fetcher).

To test in code, POST to http://localhost:8080/graphql with Content-Type: application/graphql and the GraphQL query:

query Root{ latestPost }

If the test is successful, you should get the following response back:

{
	"data": {
		"latestPost": "Hello World!"
	}
}

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
⌂ 换网址