This example shows how to implement a GraphQL server with Golang based on Prisma & gqlgen.
Clone the repository:
git clone git@github.com:robojones/graphql.git
cd graphql/
To run the example, you need the Prisma CLI. Please install it via Homebrew or using another method:
brew install prisma
brew tap
# or
npm i -g prisma
Start the server and the database using docker-compose:
docker-compose up -d
Deploy our schema to our database:
prisma deploy # this also runs prisma generate and gqlgen
go run ./server
Navigate to http://localhost:4000 in your browser to explore the API of your GraphQL server in a GraphQL Playground.
After you made changes to prisma or graphql schema files, just generate the files:
go generate