Skip to content

Serve the GraphQL Voyager UI from a Go HTTP Server

License

Notifications You must be signed in to change notification settings

kiran94/graphql-voyager-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-voyager-graphql

main Go Reference

go-voyager-graphql is a small package that allows you to serve the graphql-voyager graph from a HTTP Server.

image

Usage

// Create a new Handler, pass in your GraphQL Endpoint
vh := voyager.NewVoyagerHandler("/graphql")

// Register the Handler
http.Handle("/voyager", vh)

Complete Sample can be found in cmd/server/main.go

Local Setup

Assuming you are at the root of the repo.

make install_tools
make build
make test

# Run the Server 
# Navigate to http://localhost:8080/voyager
make run_server