You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import (
hackernews "github.com/glyphack/go-graphql-hackernews"
)
(...)
router := chi.NewRouter()
server := handler.NewDefaultServer(hackernews.NewExecutableSchema(hackernews.Config{Resolvers: &hackernews.Resolver{}}))
router.Handle("/", playground.Handler("GraphQL playground", "/query"))
router.Handle("/query", server)
log.Printf("connect to http://localhost:%s/ for GraphQL playground", port)
log.Fatal(http.ListenAndServe(":"+port, router))
This issue will allow us to do the tutorial up to Authentication.
On the authentication, we need to add a middleware to the server and the code will not work.
At this moment we will try to change the code to the code shown on the examples (the expected version).
But the problem is that:
The import: hackernews "github.com/glyphack/go-graphql-hackernews" used on the server will redirect to: "https://github.com/Glyphack/graphql-golang" and this project defines its modules as github.com/glyphack/graphlq-golang.
We have a small typo: graphlq vs graphql.
This will lead to major frustration trying to deal with broken packages instead of focusing on learning GraphQl.
The text was updated successfully, but these errors were encountered:
I tried to update this guide here but we are short on maintainers. I'm not sure if it's possible to keep this fully updated. Maybe you can check this PR here, and also use the Glyphack/graphql-golang it is updated more regularly.
Hi!
Multiple Issues:
1.
go run github.com/99designs/gqlgen init
This command will create a completely different code from the one used in the tutorial.
Created:
Expected:
https://www.howtographql.com/graphql-go/6-authentication/
This issue will allow us to do the tutorial up to Authentication.
On the authentication, we need to add a middleware to the server and the code will not work.
At this moment we will try to change the code to the code shown on the examples (the expected version).
But the problem is that:
The import: hackernews "github.com/glyphack/go-graphql-hackernews" used on the server will redirect to: "https://github.com/Glyphack/graphql-golang" and this project defines its modules as github.com/glyphack/graphlq-golang.
We have a small typo: graphlq vs graphql.
This will lead to major frustration trying to deal with broken packages instead of focusing on learning GraphQl.
The text was updated successfully, but these errors were encountered: