GraphQL Go web application template
This repository contains a small web application using GraphQL and Go on the
backend and React with Apollo Client in TypeScript for the frontend. It's
designed as a starting point for bootstrapping new web applications with Go and
TypeScript.
If you find issues, please report them on the graphql-server issue tracker.
Features
Go server:
- Reflection-based GraphQL server using
zombiezen.com/go/graphql-server
- HTTP request logs sent to stdout
- Debug logging sent to stderr
- Graceful termination
- Unit test example
TypeScript client:
Development:
- Provided Dockerfile for consistent builds and deployment to any
container-based environment like Kubernetes
- Provided Heroku configuration for simple deployment
- Continuous Integration (CI) via GitHub Actions
- Tasks and editor settings for Visual Studio Code
Getting Started
Before getting started, you will need Go 1.13 or later and Node.js 12.
You may optionally want to install Docker.
- Use the GitHub web interface to generate a repository based on
this template.
- Clone the repository to your local machine.
- Use the
set-project-name.sh
script to use your project name.
git clone https://github.com/MYNAME/PROJECT.git
cd PROJECT
./set-project-name.sh github.com/MYNAME/PROJECT
To run the app locally:
# In one terminal:
cd client && npm install && npm run watch
# In another terminal:
go build && ./graphql-go-app
You can also try this template out in Heroku:
Notable Files
Once you've got your environment set up, these are the files you will most
likely want to edit next:
License
Apache 2.0