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/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() diff --git a/version b/version index cd46610..3f8003c 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.34.1 +0.34.2