From 3d3cd7ae882d0e210409640f3ae4c225d78a7c56 Mon Sep 17 00:00:00 2001 From: Adam7066 Date: Thu, 12 Jan 2023 03:41:50 +0800 Subject: [PATCH] fix: gin sample code error in v0.17.22 --- docs/content/recipes/gin.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/content/recipes/gin.md b/docs/content/recipes/gin.md index 27b073aca78..7780401acdb 100644 --- a/docs/content/recipes/gin.md +++ b/docs/content/recipes/gin.md @@ -21,7 +21,6 @@ In your router file, define the handlers for the GraphQL and Playground endpoint ```go import ( "github.com/[username]/gqlgen-todos/graph" // Replace username with your github username - "github.com/[username]/gqlgen-todos/graph/generated" // Replace username with your github username "github.com/gin-gonic/gin" "github.com/99designs/gqlgen/graphql/handler" @@ -32,7 +31,7 @@ import ( func graphqlHandler() gin.HandlerFunc { // NewExecutableSchema and Config are in the generated.go file // Resolver is in the resolver.go file - h := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: &graph.Resolver{}})) + h := handler.NewDefaultServer(graph.NewExecutableSchema(graph.Config{Resolvers: &graph.Resolver{}})) return func(c *gin.Context) { h.ServeHTTP(c.Writer, c.Request)