I did graphql-go Tutorial
and had a little trouble. Therefore I share my note.
Getting started
https://www.howtographql.com/graphql-go/1-getting-started/
validation failed: packages.Load
error occured.
To fix it, setup go module.
% cd <project dir>
% go mod init
% go get github.com/99designs/gqlgen
# This module is needed.
% go get github.com/vektah/gqlparser/v2
%gqlgen init
Database
https://www.howtographql.com/graphql-go/4-database/
server.go
needs go-chi
.
% go get github.com/go-chi/chi
Testing query and mutation.
We can test on browser UI which URL is http://localhost:8080
.
Top comments (0)