diff --git a/docs/content/reference/complexity.md b/docs/content/reference/complexity.md index e99ac130587..8086cc01733 100644 --- a/docs/content/reference/complexity.md +++ b/docs/content/reference/complexity.md @@ -49,9 +49,8 @@ Limiting query complexity is as simple as specifying it with the provided extens func main() { c := Config{ Resolvers: &resolvers{} } - - srv := handler.NewDefaultServer(blog.NewExecutableSchema(c)) - srv.Use(extension.FixedComplexityLimit(5)) // This line is key + srv := handler.NewDefaultServer(blog.NewExecutableSchema(c)) + srv.Use(extension.FixedComplexityLimit(5)) // This line is key r.Handle("/query", srv) } ``` @@ -75,7 +74,7 @@ func main() { c.Complexity.Post.Related = countComplexity srv := handler.NewDefaultServer(blog.NewExecutableSchema(c)) - srv.Use(extension.FixedComplexityLimit(5)) + srv.Use(extension.FixedComplexityLimit(5)) http.Handle("/query", gqlHandler) } ```