Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 6-authentication.md #1473

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion content/backend/graphql-go/6-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ func ForContext(ctx context.Context) *users.User {
</Instruction>

Now we can use the middleware we created in our server:
Create a new folder in the root directory called 'server' and move the server.go file to the directory you just created.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good suggestion which I did not know about when I wrote this. I also prefer to call the directory cmd as it's more common in the Go community.


<Instruction>

Expand All @@ -249,7 +250,7 @@ import (
"net/http"
"os"

"github.com/99designs/gqlgen/handler"
"github.com/99designs/gqlgen/graphql/handler"
hackernews "github.com/glyphack/go-graphql-hackernews"
"github.com/glyphack/go-graphql-hackernews/internal/pkg/db/mysql"
"github.com/go-chi/chi"
Expand Down