From f26a60c5ac9ca85975e508a6049da3e330bc728d Mon Sep 17 00:00:00 2001 From: Kcat Date: Tue, 4 Aug 2020 18:52:10 +0800 Subject: [PATCH] Fixed transport not support issue --- docs/content/recipes/cors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/recipes/cors.md b/docs/content/recipes/cors.md index cbfaa2576d3..9dc03f0d6ce 100644 --- a/docs/content/recipes/cors.md +++ b/docs/content/recipes/cors.md @@ -36,7 +36,7 @@ func main() { }).Handler) - srv := handler.New(starwars.NewExecutableSchema(starwars.NewResolver())) + srv := handler.NewDefaultServer(starwars.NewExecutableSchema(starwars.NewResolver())) srv.AddTransport(&transport.Websocket{ Upgrader: websocket.Upgrader{ CheckOrigin: func(r *http.Request) bool {