mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-04-30 07:01:42 +02:00
Remove websocket sse GraphQL support
This commit is contained in:
parent
acaad69917
commit
aba75b3a19
@ -32,7 +32,6 @@ import (
|
|||||||
"github.com/ClusterCockpit/cc-backend/web"
|
"github.com/ClusterCockpit/cc-backend/web"
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/gorilla/websocket"
|
|
||||||
httpSwagger "github.com/swaggo/http-swagger"
|
httpSwagger "github.com/swaggo/http-swagger"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -58,16 +57,16 @@ func serverInit() {
|
|||||||
graphQLServer := handler.New(
|
graphQLServer := handler.New(
|
||||||
generated.NewExecutableSchema(generated.Config{Resolvers: resolver}))
|
generated.NewExecutableSchema(generated.Config{Resolvers: resolver}))
|
||||||
|
|
||||||
graphQLServer.AddTransport(transport.SSE{})
|
// graphQLServer.AddTransport(transport.SSE{})
|
||||||
graphQLServer.AddTransport(transport.POST{})
|
graphQLServer.AddTransport(transport.POST{})
|
||||||
graphQLServer.AddTransport(transport.Websocket{
|
// graphQLServer.AddTransport(transport.Websocket{
|
||||||
KeepAlivePingInterval: 10 * time.Second,
|
// KeepAlivePingInterval: 10 * time.Second,
|
||||||
Upgrader: websocket.Upgrader{
|
// Upgrader: websocket.Upgrader{
|
||||||
CheckOrigin: func(r *http.Request) bool {
|
// CheckOrigin: func(r *http.Request) bool {
|
||||||
return true
|
// return true
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
})
|
// })
|
||||||
|
|
||||||
if os.Getenv("DEBUG") != "1" {
|
if os.Getenv("DEBUG") != "1" {
|
||||||
// Having this handler means that a error message is returned via GraphQL instead of the connection simply beeing closed.
|
// Having this handler means that a error message is returned via GraphQL instead of the connection simply beeing closed.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user