Skip to content

Commit

Permalink
Fix: HTTP Handler route GET and POST
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushjha0409 committed Nov 13, 2024
1 parent 7663b28 commit 56d1dd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/graph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const defaultPort = "8080"
func (g *graph) Init() error {
g.server = handler.NewDefaultServer(NewExecutableSchema(Config{Resolvers: &Resolver{}}))

http.Handle("/", playground.ApolloSandboxHandler("GraphQL Playground", "/api/v1/graphql"))
http.Handle("GET /api/v1/graphql", playground.ApolloSandboxHandler("GraphQL Playground", "/api/v1/graphql"))

http.Handle("/api/v1/graphql", g.server)
http.Handle("POST /api/v1/graphql", g.server)
return nil
}

Expand Down

0 comments on commit 56d1dd9

Please sign in to comment.