Skip to content

Commit

Permalink
Merge pull request #1757 from DimuthuMadushan/graphiql
Browse files Browse the repository at this point in the history
Fix GraphiQL Client Service Url
  • Loading branch information
DimuthuMadushan committed Feb 16, 2024
2 parents 15e819b + 417c583 commit b69aac8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ballerina-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.6"
version = "2.10.7"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down
2 changes: 1 addition & 1 deletion ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.6"
version = "2.10.7"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down
3 changes: 3 additions & 0 deletions ballerina/constants.bal
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@ const PATH = "path";

// Constants related to the DataLoader
const DEFAULT_PREFETCH_METHOD_NAME_PREFIX = "pre";

// Localhost
const LOCALHOST = "localhost";
9 changes: 4 additions & 5 deletions ballerina/listener.bal
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ public class Listener {
}
self.wsListener = ();
self.graphiql = {};
string host = configuration.host;
int port = self.httpListener.getPort();
if configuration.secureSocket is () {
self.httpEndpoint = string `http://${host}:${port}`;
self.websocketEndpoint = string `ws://${host}:${port}`;
self.httpEndpoint = string `http://${LOCALHOST}:${port}`;
self.websocketEndpoint = string `ws://${LOCALHOST}:${port}`;
} else {
self.httpEndpoint = string `https://${host}:${port}`;
self.websocketEndpoint = string `wss://${host}:${port}`;
self.httpEndpoint = string `https://${LOCALHOST}:${port}`;
self.websocketEndpoint = string `wss://${LOCALHOST}:${port}`;
}
}

Expand Down

0 comments on commit b69aac8

Please sign in to comment.