From 9be9858295b3c911d5537b083279be994510c23f Mon Sep 17 00:00:00 2001 From: Combiz Salehomoum Date: Tue, 17 Jul 2018 15:14:57 -0700 Subject: [PATCH 1/4] Fixed fragment matcher error message, closes #3700 --- packages/apollo-cache-inmemory/src/fragmentMatcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apollo-cache-inmemory/src/fragmentMatcher.ts b/packages/apollo-cache-inmemory/src/fragmentMatcher.ts index c1e33199288..4ae8943cb2a 100644 --- a/packages/apollo-cache-inmemory/src/fragmentMatcher.ts +++ b/packages/apollo-cache-inmemory/src/fragmentMatcher.ts @@ -78,7 +78,7 @@ export class HeuristicFragmentMatcher implements FragmentMatcherInterface { // difference, so we warn the user, but still try to match it (backcompat). warnOnceInDevelopment( `You are using the simple (heuristic) fragment matcher, but your queries contain union or interface types. - Apollo Client will not be able to able to accurately map fragments.` + + Apollo Client will not be able to accurately map fragments. ` + `To make this error go away, use the IntrospectionFragmentMatcher as described in the docs: ` + `https://www.apollographql.com/docs/react/recipes/fragment-matching.html`, 'error', From 08deec258bb5dfcac693f12a700105b028e6f1f8 Mon Sep 17 00:00:00 2001 From: Combiz Salehomoum Date: Tue, 17 Jul 2018 15:22:58 -0700 Subject: [PATCH 2/4] Added changelog --- CHANGELOG.md | 2 ++ packages/apollo-cache-inmemory/CHANGELOG.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd064076e02..6d97340e631 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## vNext +- Fix typo in console.warn regarding fragment matching error message. + ### Apollo Client (vNext) - Documentation updates. diff --git a/packages/apollo-cache-inmemory/CHANGELOG.md b/packages/apollo-cache-inmemory/CHANGELOG.md index ff38059970f..fd90ba049ad 100644 --- a/packages/apollo-cache-inmemory/CHANGELOG.md +++ b/packages/apollo-cache-inmemory/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +### vNext + +- Fix typo in console.warn regarding fragment matching error message. + ### 1.2.5 - No changes. From bf00790ddc3b4cb508d7db871771c6e85b58fed1 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Tue, 7 Aug 2018 15:25:43 -0400 Subject: [PATCH 3/4] Changelog update --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c26d3344937..4da0eddb509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## vNext -- Fix typo in console.warn regarding fragment matching error message. + ### Apollo Client (vNext) @@ -38,6 +38,11 @@ [@hwillson](https://github.com/hwillson) in [#3774](https://github.com/apollographql/apollo-client/pull/3774)
[@hwillson](https://github.com/hwillson) in [#3779](https://github.com/apollographql/apollo-client/pull/3779) +### Apollo Cache In-Memory (vNext) + +- Fix typo in `console.warn` regarding fragment matching error message.
+ [@combizs](https://github.com/combizs) in [#3701](https://github.com/apollographql/apollo-client/pull/3701) + ## 2.3.7 (July 24, 2018) From a73607173faa9cddd0f6d86a9e9dded60688c431 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Tue, 7 Aug 2018 15:28:26 -0400 Subject: [PATCH 4/4] Slight warning message formatting changes --- packages/apollo-cache-inmemory/src/fragmentMatcher.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/apollo-cache-inmemory/src/fragmentMatcher.ts b/packages/apollo-cache-inmemory/src/fragmentMatcher.ts index 4ae8943cb2a..87c416be87e 100644 --- a/packages/apollo-cache-inmemory/src/fragmentMatcher.ts +++ b/packages/apollo-cache-inmemory/src/fragmentMatcher.ts @@ -77,10 +77,11 @@ export class HeuristicFragmentMatcher implements FragmentMatcherInterface { // If it's 1, we don't want to return anything, if it's 2 we want to match. We can't tell the // difference, so we warn the user, but still try to match it (backcompat). warnOnceInDevelopment( - `You are using the simple (heuristic) fragment matcher, but your queries contain union or interface types. - Apollo Client will not be able to accurately map fragments. ` + - `To make this error go away, use the IntrospectionFragmentMatcher as described in the docs: ` + - `https://www.apollographql.com/docs/react/recipes/fragment-matching.html`, + 'You are using the simple (heuristic) fragment matcher, but your ' + + 'queries contain union or interface types. Apollo Client will not be ' + + 'able to accurately map fragments. To make this error go away, use ' + + 'the `IntrospectionFragmentMatcher` as described in the docs: ' + + 'https://www.apollographql.com/docs/react/recipes/fragment-matching.html', 'error', );