From 9f7b788cf5b9667195c2869c735ac051e4067639 Mon Sep 17 00:00:00 2001 From: Michal Baranowski Date: Mon, 18 Jun 2018 23:20:43 +0400 Subject: [PATCH 1/3] From string template to normal string concatenation. --- packages/apollo-utilities/src/storeUtils.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/apollo-utilities/src/storeUtils.ts b/packages/apollo-utilities/src/storeUtils.ts index 7da2c275205..c5273e05962 100644 --- a/packages/apollo-utilities/src/storeUtils.ts +++ b/packages/apollo-utilities/src/storeUtils.ts @@ -127,10 +127,13 @@ export function valueToObjectRepresentation( } else if (isNullValue(value)) { argObj[name.value] = null; } else { - throw new Error(`The inline argument "${name.value}" of kind "${ - (value as any).kind - }" is not supported. - Use variables instead of inline arguments to overcome this limitation.`); + throw new Error( + 'The inline argument "' + + name.value + + '" of kind "' + + (value as any).kind + + '" is not supported. Use variables instead of inline arguments to overcome this limitation.', + ); } } From 8fb11247469ff4121764e33713af10ac074a6e09 Mon Sep 17 00:00:00 2001 From: Michal Baranowski Date: Mon, 18 Jun 2018 23:38:03 +0400 Subject: [PATCH 2/3] Updated the changelog --- packages/apollo-utilities/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/apollo-utilities/CHANGELOG.md b/packages/apollo-utilities/CHANGELOG.md index 30836268b66..a17953f2556 100644 --- a/packages/apollo-utilities/CHANGELOG.md +++ b/packages/apollo-utilities/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +### vNext + +- Removed whitespaces from error message +[ISSUE #3398](https://github.com/apollographql/apollo-client/issues/3398) + ### 1.0.15 - No changes From 3de955416d09a8db5bc1979efb2dd5976eea34f0 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Tue, 19 Jun 2018 19:21:27 -0400 Subject: [PATCH 3/3] Sligh formatting adjustment; Changelog update --- packages/apollo-utilities/CHANGELOG.md | 5 +++-- packages/apollo-utilities/src/storeUtils.ts | 8 +++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/apollo-utilities/CHANGELOG.md b/packages/apollo-utilities/CHANGELOG.md index a17953f2556..3b4eeabc358 100644 --- a/packages/apollo-utilities/CHANGELOG.md +++ b/packages/apollo-utilities/CHANGELOG.md @@ -2,8 +2,9 @@ ### vNext -- Removed whitespaces from error message -[ISSUE #3398](https://github.com/apollographql/apollo-client/issues/3398) +- Removed unnecessary whitespace from error message + [Issue #3398](https://github.com/apollographql/apollo-client/issues/3398) + [PR #3593](https://github.com/apollographql/apollo-client/pull/3593) ### 1.0.15 diff --git a/packages/apollo-utilities/src/storeUtils.ts b/packages/apollo-utilities/src/storeUtils.ts index c5273e05962..2cac846ac55 100644 --- a/packages/apollo-utilities/src/storeUtils.ts +++ b/packages/apollo-utilities/src/storeUtils.ts @@ -128,11 +128,9 @@ export function valueToObjectRepresentation( argObj[name.value] = null; } else { throw new Error( - 'The inline argument "' + - name.value + - '" of kind "' + - (value as any).kind + - '" is not supported. Use variables instead of inline arguments to overcome this limitation.', + `The inline argument "${name.value}" of kind "${(value as any).kind}"` + + 'is not supported. Use variables instead of inline arguments to ' + + 'overcome this limitation.' ); } }