Skip to content

Commit

Permalink
chore: fixed deprecated handler.NewDefaultServer func
Browse files Browse the repository at this point in the history
Signed-off-by: Finsen Varghese <[email protected]>
  • Loading branch information
fvarg00 authored Dec 10, 2024
1 parent fe90524 commit 3152eac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/graph/resolvers/schema.resolvers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var _ = Describe("Handlers", func() {

queryResolver := &resolvers.Resolver{DB: gormDb}

gqlHandler := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
gqlHandler := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
srv := httptest.NewServer(gqlHandler)
defer srv.Close()

Expand Down Expand Up @@ -126,7 +126,7 @@ var _ = Describe("Handlers", func() {

queryResolver := &resolvers.Resolver{DB: gormDb}

gqlHandler := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
gqlHandler := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
srv := httptest.NewServer(gqlHandler)
defer srv.Close()

Expand Down Expand Up @@ -210,7 +210,7 @@ var _ = Describe("Handlers", func() {

queryResolver := &resolvers.Resolver{DB: gormDb}

gqlHandler := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
gqlHandler := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
srv := httptest.NewServer(gqlHandler)
defer srv.Close()

Expand Down Expand Up @@ -268,7 +268,7 @@ var _ = Describe("Handlers", func() {

queryResolver := &resolvers.Resolver{DB: gormDb}

gqlHandler := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
gqlHandler := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
srv := httptest.NewServer(gqlHandler)
defer srv.Close()

Expand Down Expand Up @@ -451,7 +451,7 @@ var _ = Describe("Handlers", func() {

queryResolver := &resolvers.Resolver{DB: gormDb}

gqlHandler := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
gqlHandler := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
srv := httptest.NewServer(gqlHandler)
defer srv.Close()

Expand Down Expand Up @@ -515,7 +515,7 @@ var _ = Describe("Handlers", func() {
queryResolver := &resolvers.Resolver{DB: gormDb}

// Create a new GraphQL handler with the resolver
gqlHandler := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))
gqlHandler := handler.New(generated.NewExecutableSchema(generated.Config{Resolvers: queryResolver}))

// Create a new HTTP test server with the GraphQL handler
srv := httptest.NewServer(gqlHandler)
Expand Down

0 comments on commit 3152eac

Please sign in to comment.