@@ -18,7 +18,7 @@ type graphiqlPage struct {
18
18
VariablesString string
19
19
OperationName string
20
20
Endpoint template.URL
21
- EndpointURLWS template.URL
21
+ SubscriptionEndpoint template.URL
22
22
UsingHTTP bool
23
23
UsingWS bool
24
24
}
@@ -59,12 +59,12 @@ func renderGraphiQL(w http.ResponseWriter, params graphql.Params, handler Handle
59
59
isEndpointUsingWS := strings .HasPrefix (handler .Endpoint , "ws://" )
60
60
UsingHTTP := ! isEndpointUsingWS
61
61
UsingWS := isEndpointUsingWS || handler .SubscriptionsEndpoint != ""
62
- EndpointURLWS := ""
62
+ SubscriptionEndpoint := ""
63
63
if UsingWS {
64
64
if isEndpointUsingWS {
65
- EndpointURLWS = handler .Endpoint
65
+ SubscriptionEndpoint = handler .Endpoint
66
66
} else {
67
- EndpointURLWS = handler .SubscriptionsEndpoint
67
+ SubscriptionEndpoint = handler .SubscriptionsEndpoint
68
68
}
69
69
}
70
70
@@ -76,7 +76,7 @@ func renderGraphiQL(w http.ResponseWriter, params graphql.Params, handler Handle
76
76
VariablesString : varsString ,
77
77
OperationName : params .OperationName ,
78
78
Endpoint : template .URL (handler .Endpoint ),
79
- EndpointURLWS : template .URL (EndpointURLWS ),
79
+ SubscriptionEndpoint : template .URL (SubscriptionEndpoint ),
80
80
UsingHTTP : UsingHTTP ,
81
81
UsingWS : UsingWS ,
82
82
}
@@ -172,7 +172,7 @@ add "&raw" to the end of the URL within a browser.
172
172
}
173
173
174
174
{{ if .UsingWS }}
175
- var subscriptionsClient = new window.SubscriptionsTransportWs.SubscriptionClient({{ .EndpointURLWS }}, {
175
+ var subscriptionsClient = new window.SubscriptionsTransportWs.SubscriptionClient({{ .SubscriptionEndpoint }}, {
176
176
reconnect: true
177
177
});
178
178
var graphQLWSFetcher = subscriptionsClient.request.bind(subscriptionsClient);
0 commit comments