Skip to content

Commit

Permalink
DOC: Fixed indention in example code. (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsblhsn authored Nov 5, 2021
1 parent 47de912 commit 4a4b560
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/content/reference/complexity.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
```
Expand All @@ -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)
}
```
Expand Down

0 comments on commit 4a4b560

Please sign in to comment.