Skip to content

Commit

Permalink
docs: Retire deprecated handler methods
Browse files Browse the repository at this point in the history
Refactoring the handler package deprecated some methods and this tutorial still uses those methods. Thus, this commit retires the following methods and use the new alternatives.

* https://github.com/99designs/gqlgen/blob/5ad012e3d7be1127706b9c8a3da0378df3a98ec1/handler/handler.go#L17
* https://github.com/99designs/gqlgen/blob/5ad012e3d7be1127706b9c8a3da0378df3a98ec1/handler/handler.go#L242

See 99designs/gqlgen#885 for more details about the refactor.
  • Loading branch information
takanabe authored Jun 22, 2021
1 parent f53e0e8 commit c3fd5eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/backend/graphql-go/4-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ func main() {

database.InitDB()
database.Migrate()
server := handler.GraphQL(hackernews.NewExecutableSchema(hackernews.Config{Resolvers: &hackernews.Resolver{}}))
router.Handle("/", handler.Playground("GraphQL playground", "/query"))
server := handler.New(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)
Expand Down

0 comments on commit c3fd5eb

Please sign in to comment.