Skip to content

Quick start template for go + graphql + gorm project

License

Notifications You must be signed in to change notification settings

ysthey/go-gql-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang GraphQl Dev Environment [Project Template]

Quick way to create / run Graphql server dev environment with Golang.

Golang packages:

    github.com/99designs/gqlgen
    github.com/gin-gonic/gin
    github.com/google/uuid
    github.com/jinzhu/gorm
    github.com/spf13/viper
    github.com/vektah/gqlparser
    gopkg.in/gormigrate.v1

Usage:

  1. To change package name

     $ grep -rl "github.com/ysthey/go-gql-start" ./* | xargs sed -i 's/github\.com\/ysthey\/go-gql-start/newgitrepo\.com\/newpath\/newpackage/g'
    
  2. Configuration files are ".env" and "./conf/*.yml"

  3. To build:

     $ ./scripts/build.sh
    
  4. To run:

     $ ./scripts/run.sh
    
  5. To run tests:

     $ ./scripts/run_tests.sh
    
  6. To update schema:

     $ vim ./internal/gql/schemas/schema.graphql
     $ ./scripts/gqlgen.sh
    

Inspired by :

  1. Creating an opinionated GraphQL server with Go
  1. UUID or GUID as Primary Keys? Be Careful!
  1. Golang configuration in 12 factor applications

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Quick start template for go + graphql + gorm project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published