go-gql-start

module
v0.0.0-...-8e3e671 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT

README

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

Directories

Path Synopsis
cmd
internal
gql
orm
Package orm provides `GORM` helpers for the creation, migration and access on the project's database
Package orm provides `GORM` helpers for the creation, migration and access on the project's database
pkg

Jump to

Keyboard shortcuts

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