Skip to content

Commit

Permalink
Set complexity limit
Browse files Browse the repository at this point in the history
  • Loading branch information
darleet committed May 28, 2024
1 parent c19d817 commit 8e8d0b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"github.com/99designs/gqlgen/graphql/handler"
"github.com/99designs/gqlgen/graphql/handler/extension"
"github.com/99designs/gqlgen/graphql/handler/transport"
"github.com/darleet/blog-graphql/internal/middleware/auth"
"github.com/darleet/blog-graphql/internal/middleware/loader"
Expand Down Expand Up @@ -58,6 +59,8 @@ func main() {

srv.AddTransport(&transport.Websocket{})

srv.Use(extension.FixedComplexityLimit(300))

authMW := auth.NewMiddleware()
logMW := logging.NewMiddleware(log)

Expand Down

0 comments on commit 8e8d0b7

Please sign in to comment.