Skip to content
Barebones starting point for a Relay application with Golang GraphQL server
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Update nodeDefinitions IDFetcher to work with new API Feb 29, 2016
js Added key to widget list items to remove warning Feb 29, 2016
scripts fix broken code caused by graphql-go API updates Feb 2, 2016
server.js Merge latest changes from HEAD Oct 2, 2015

Golang-Relay Starter Kit

This kit includes:

  • a NodeJS app server: to serve the front-end written with react-relay
  • a Golang GraphQL server: to serve the back-end graphql-go server that handles GraphQL queries
  • a Babel transpiler workflow using webpack that you can use to get started building an app with Relay.

For a walkthrough, see the Relay tutorial.


This is based on alpha version of graphql-go and graphql-relay-go. Be sure to watch both repositories for latest changes.


  • Install dependencies for NodeJS app server
npm install
  • Install dependencies for Golang GraphQL server
go get -v


Start a local server:

npm start

The above command will run both the NodeJS app server and Golang GraphQL server concurrently.



Any changes you make to files in the js/ directory will cause the server to automatically rebuild the app and refresh your browser.


Schema data

Since Golang does not support loading package / module dynamically, remember to update the package import for schema data in:

  • graphql.go
  • scripts/updateSchema.go

For e.g

import (
  "" // <--- update to package containing schema

Schema updates

If at any time you make changes to data/schema.go, stop the server, regenerate data/schema.json, and restart the server:

npm run update-schema
npm start

schema.json is needed by the JS code for ./build/babelRelayPlugin.js


  • todomvc-relay-go - Port of the React/Relay TodoMVC app, driven by a Golang GraphQL backend

Feel free to submit a PR to add to this list.


  • Swap out express-graphql server with a Golang GraphQL server
  • GraphQL schema definition in Golang
  • Generate schema.json from schema definition for babel-relay-plugin
  • Generate schema.graphql from schema definition


This kit is build on top of

You can’t perform that action at this time.