Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.38 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.38 KB

gql-demo

gql-demo is working demo for exploring the usage of libraries that enables a GraphQL server with database access that can mantain type safety and leverage code generation.

Getting Started

Development Machine Prerequisites

Running Development Environment

Start the development server:

MYSQL_USER= MYSQL_PASSWORD= MYSQL_DB= bin/start.sh

Migrate the initial database schema:

MYSQL_USER= MYSQL_PASSWORD= MYSQL_DB= bin/migrate.sh

Generate Go code within internal/models directory, uses the database schema:

bin/generate-models.sh

Generate Go code within cmd/graphql/gqlgen directory, uses the graphql schema:

bin/generate-gql.sh

Demo

Query

query

Subscription

subscription