graphql-go-app

command module
v0.0.0-...-13a50b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

README

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.

  1. Use the GitHub web interface to generate a repository based on this template.
  2. Clone the repository to your local machine.
  3. 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:

Deploy to 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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL