From 6493015db3e1a8df5c7983bfca71cf7a31f609e4 Mon Sep 17 00:00:00 2001 From: DimuthuMadushan Date: Thu, 15 Feb 2024 15:15:52 +0530 Subject: [PATCH 1/2] Fix service url used in GraphiQL client --- ballerina/constants.bal | 3 +++ ballerina/listener.bal | 9 ++++----- changelog.md | 5 +++++ gradle.properties | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ballerina/constants.bal b/ballerina/constants.bal index 9a85726d5..5afd32227 100644 --- a/ballerina/constants.bal +++ b/ballerina/constants.bal @@ -81,3 +81,6 @@ const PATH = "path"; // Constants related to the DataLoader const DEFAULT_PREFETCH_METHOD_NAME_PREFIX = "pre"; + +// Localhost +const LOCALHOST = "localhost"; diff --git a/ballerina/listener.bal b/ballerina/listener.bal index d3c9ac358..1e98e6754 100644 --- a/ballerina/listener.bal +++ b/ballerina/listener.bal @@ -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}`; } } diff --git a/changelog.md b/changelog.md index 7322a9a99..dbe1b7935 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed +- [[#6067] Fix Returning Error while Accessing the Sevice via GraphiQL Client in Windows](https://github.com/ballerina-platform/ballerina-library/issues/6067) + +## [1.10.0] - 2023-09-18 + ### Added - [[#2998] Add `@deprecated` Directive Support for Output Object Defined using Record Types](https://github.com/ballerina-platform/ballerina-standard-library/issues/2998) - [[#4586] Add Support for Printing GraphiQL Url to Stdout](https://github.com/ballerina-platform/ballerina-standard-library/issues/4586) diff --git a/gradle.properties b/gradle.properties index 5d12e7190..e79138b8f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=1.10.0 +version=1.10.1-SNAPSHOT ballerinaLangVersion=2201.8.0 checkstylePluginVersion=10.12.0 From d53fe76a12b114403ce5aae304315ad4d1a16cde Mon Sep 17 00:00:00 2001 From: DimuthuMadushan Date: Thu, 15 Feb 2024 16:01:10 +0530 Subject: [PATCH 2/2] Update the changelog --- ballerina/Ballerina.toml | 10 +++++----- ballerina/CompilerPlugin.toml | 4 ++-- ballerina/Dependencies.toml | 10 +++++----- changelog.md | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 8ab88860b..91fe0e75b 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "graphql" -version = "1.10.0" +version = "1.10.1" authors = ["Ballerina"] export=["graphql", "graphql.subgraph", "graphql.dataloader"] keywords = ["gql", "network", "query", "service"] @@ -16,11 +16,11 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "graphql-native" -version = "1.10.0" -path = "../native/build/libs/graphql-native-1.10.0.jar" +version = "1.10.1" +path = "../native/build/libs/graphql-native-1.10.1-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "graphql-commons" -version = "1.10.0" -path = "../commons/build/libs/graphql-commons-1.10.0.jar" +version = "1.10.1" +path = "../commons/build/libs/graphql-commons-1.10.1-SNAPSHOT.jar" diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 186ad98ca..3ec76ed4a 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,7 +3,7 @@ id = "graphql-compiler-plugin" class = "io.ballerina.stdlib.graphql.compiler.GraphqlCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/graphql-compiler-plugin-1.10.0.jar" +path = "../compiler-plugin/build/libs/graphql-compiler-plugin-1.10.1-SNAPSHOT.jar" [[dependency]] -path = "../commons/build/libs/graphql-commons-1.10.0.jar" +path = "../commons/build/libs/graphql-commons-1.10.1-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 0938c38cb..fb2299b9f 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -25,7 +25,7 @@ modules = [ [[package]] org = "ballerina" name = "cache" -version = "3.7.0" +version = "3.7.1" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "jballerina.java"}, @@ -67,7 +67,7 @@ modules = [ [[package]] org = "ballerina" name = "graphql" -version = "1.10.0" +version = "1.10.1" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "file"}, @@ -97,7 +97,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.0" +version = "2.10.7" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, @@ -301,7 +301,7 @@ modules = [ [[package]] org = "ballerina" name = "observe" -version = "1.2.0" +version = "1.2.2" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -376,7 +376,7 @@ modules = [ [[package]] org = "ballerina" name = "websocket" -version = "2.10.0" +version = "2.10.1" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "constraint"}, diff --git a/changelog.md b/changelog.md index dbe1b7935..3e82e3957 100644 --- a/changelog.md +++ b/changelog.md @@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] ### Fixed -- [[#6067] Fix Returning Error while Accessing the Sevice via GraphiQL Client in Windows](https://github.com/ballerina-platform/ballerina-library/issues/6067) +- [[#6067] Fix Returning Error while Accessing the Service via GraphiQL Client in Windows](https://github.com/ballerina-platform/ballerina-library/issues/6067) ## [1.10.0] - 2023-09-18