From a8a9e11e917716538206eb7d5de21dbfd09630bd Mon Sep 17 00:00:00 2001 From: Jeff Auriemma Date: Thu, 24 Aug 2023 16:25:54 -0400 Subject: [PATCH] Fix typo in error message (#11163) --- .changeset/orange-balloons-prove.md | 5 +++++ src/react/hooks/__tests__/useBackgroundQuery.test.tsx | 2 +- src/react/hooks/__tests__/useQuery.test.tsx | 2 +- src/react/hooks/__tests__/useSuspenseQuery.test.tsx | 2 +- src/utilities/globals/invariantWrappers.ts | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/orange-balloons-prove.md diff --git a/.changeset/orange-balloons-prove.md b/.changeset/orange-balloons-prove.md new file mode 100644 index 00000000000..63b4aa4c828 --- /dev/null +++ b/.changeset/orange-balloons-prove.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Fix typo in error message: "occured" -> "occurred" diff --git a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx index 59f19482327..1abb226b534 100644 --- a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx +++ b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx @@ -2990,7 +2990,7 @@ describe("useBackgroundQuery", () => { }); // Because we switched to a `no-cache` fetch policy, we should not see the - // newly fetched data in the cache after the fetch occured. + // newly fetched data in the cache after the fetch occurred. expect(cache.readQuery({ query })).toEqual({ character: { __typename: "Character", diff --git a/src/react/hooks/__tests__/useQuery.test.tsx b/src/react/hooks/__tests__/useQuery.test.tsx index 962a0a7656b..a74fcb31076 100644 --- a/src/react/hooks/__tests__/useQuery.test.tsx +++ b/src/react/hooks/__tests__/useQuery.test.tsx @@ -2196,7 +2196,7 @@ describe("useQuery Hook", () => { }); }); - it("calls `onError` when a network error has occured", async () => { + it("calls `onError` when a network error has occurred", async () => { const query = gql` { hello diff --git a/src/react/hooks/__tests__/useSuspenseQuery.test.tsx b/src/react/hooks/__tests__/useSuspenseQuery.test.tsx index ac3a699bc1d..868686eb785 100644 --- a/src/react/hooks/__tests__/useSuspenseQuery.test.tsx +++ b/src/react/hooks/__tests__/useSuspenseQuery.test.tsx @@ -6392,7 +6392,7 @@ describe("useSuspenseQuery", () => { }); // Because we switched to a `no-cache` fetch policy, we should not see the - // newly fetched data in the cache after the fetch occured. + // newly fetched data in the cache after the fetch occurred. expect(cache.extract()[cacheKey]).toEqual({ __typename: "Character", id: "1", diff --git a/src/utilities/globals/invariantWrappers.ts b/src/utilities/globals/invariantWrappers.ts index e990b110a37..655741c5476 100644 --- a/src/utilities/globals/invariantWrappers.ts +++ b/src/utilities/globals/invariantWrappers.ts @@ -110,7 +110,7 @@ function getErrorMsg(message?: string | number, messageArgs: unknown[] = []) { return ( (global[ApolloErrorMessageHandler] && global[ApolloErrorMessageHandler](message, args)) || - `An error occured! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent( + `An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent( JSON.stringify({ version, message,