Golang Relay Starter Kit

screenshot of Golang Relay Starter Kit
express
react

Barebones starting point for a Relay application with Golang GraphQL server

Overview

The Golang-Relay Starter Kit is a toolkit for building applications using React and Relay, with a Golang GraphQL server as the backend. It includes a NodeJS app server to serve the front-end written with React-Relay, and a Golang GraphQL server to handle GraphQL queries. The kit also includes a Babel transpiler workflow using webpack to help developers get started building an app with Relay.

Features

  • NodeJS app server to serve the front-end
  • Golang GraphQL server to serve the back-end
  • Babel transpiler workflow using webpack
  • Support for schema updates
  • Examples, including a TodoMVC app driven by a Golang GraphQL backend

Running

To start a local server, run the following command:

npm start

This will run both the NodeJS app server and Golang GraphQL server concurrently. The Golang GraphQL server will run at http://localhost:8080/graphql and the NodeJS app server will run at http://localhost:3000.

Developing

For JavaScript development, any changes made to files in the js/ directory will cause the server to automatically rebuild the app and refresh the browser.

For Golang development, remember to update the package import for schema data in graphql.go/scripts/updateSchema.go since Golang does not support loading package/module dynamically.

Summary

The Golang-Relay Starter Kit is a powerful toolkit for building applications using React and Relay. With its NodeJS app server, Golang GraphQL server, and Babel transpiler workflow, developers can quickly get started building apps with Relay. The kit also provides support for schema updates and includes examples, including a TodoMVC app with a Golang GraphQL backend. Overall, this kit offers a comprehensive solution for creating robust applications with React, Relay, and Golang.

express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.