Reconnect custom websocket upgrader
This commit is contained in:
parent
d235a7e352
commit
5ffc1a57dd
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/99designs/gqlgen/graphql/handler/transport"
|
||||
photoview_graphql "github.com/photoview/photoview/api/graphql"
|
||||
"github.com/photoview/photoview/api/graphql/resolvers"
|
||||
"github.com/photoview/photoview/api/server"
|
||||
"github.com/photoview/photoview/api/utils"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
@ -27,6 +28,7 @@ func GraphqlEndpoint(db *gorm.DB) *graphql_handler.Server {
|
|||
graphqlServer := graphql_handler.New(photoview_graphql.NewExecutableSchema(graphqlConfig))
|
||||
graphqlServer.AddTransport(transport.Websocket{
|
||||
KeepAlivePingInterval: 10 * time.Second,
|
||||
Upgrader: server.WebsocketUpgrader(utils.DevelopmentMode()),
|
||||
})
|
||||
graphqlServer.AddTransport(transport.Options{})
|
||||
graphqlServer.AddTransport(transport.GET{})
|
||||
|
|
Loading…
Reference in New Issue