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

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