Skip to content

Commit

Permalink
Merge pull request #1444 from lisowskibraeden/patch-1
Browse files Browse the repository at this point in the history
Update cors.md
  • Loading branch information
mtibben authored Jul 29, 2021
2 parents a4d6785 + 5ef5d14 commit e3293b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/content/recipes/cors.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"github.com/99designs/gqlgen/graphql/handler"
"github.com/go-chi/chi"
"github.com/rs/cors"
"github.com/gorilla/websocket"
"github.com/99designs/gqlgen/graphql/playground"
)

func main() {
Expand All @@ -48,7 +50,7 @@ func main() {
},
})

router.Handle("/", handler.Playground("Starwars", "/query"))
router.Handle("/", playground.Handler("Starwars", "/query"))
router.Handle("/query", srv)

err := http.ListenAndServe(":8080", router)
Expand Down

0 comments on commit e3293b5

Please sign in to comment.