From 2f152091eb9cd3dedf9e2e01862e12034e70afa8 Mon Sep 17 00:00:00 2001 From: linchen1987 Date: Tue, 26 Sep 2023 09:00:15 +0800 Subject: [PATCH 1/2] fix: gql request crashs when formatting scalar args --- packages/sdk-util/src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk-util/src/util.js b/packages/sdk-util/src/util.js index a02a14d..5d1ba40 100644 --- a/packages/sdk-util/src/util.js +++ b/packages/sdk-util/src/util.js @@ -190,7 +190,7 @@ const formatArgs = (values, specs = {}) => { // escape slash(\) and double quotes (") if ('String' === type) { - const container = isNull(value) ? null : value.includes('\n') ? '"""' : '"'; + const container = isNull(value) ? null : (value || '').includes('\n') ? '"""' : '"'; return isNull(value) ? null : `${container}${value .toString() From 3ba905aea2e54fc9b1400aaf15070ae49dbe18f9 Mon Sep 17 00:00:00 2001 From: linchen1987 Date: Tue, 26 Sep 2023 09:01:04 +0800 Subject: [PATCH 2/2] chore: bump version --- CHANGELOG.md | 3 +++ version | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ab6469..9e6dacc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.34.2 (September 26, 2023) +- fix: gql request crashes when formatting scalar args + ## 0.34.1 (September 25, 2023) - fix: input string should can have \n in gql query diff --git a/version b/version index cd46610..3f8003c 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.34.1 +0.34.2