diff --git a/.api-reports/api-report-core.api.md b/.api-reports/api-report-core.api.md index 0f24c2b57c1..77e593eea52 100644 --- a/.api-reports/api-report-core.api.md +++ b/.api-reports/api-report-core.api.md @@ -1680,8 +1680,6 @@ class QueryInfo { init(query: { document: DocumentNode; variables: Record | undefined; - observableQuery?: ObservableQuery; - lastRequestId?: number; }): this; // (undocumented) lastRequestId: number; diff --git a/.api-reports/api-report-react.api.md b/.api-reports/api-report-react.api.md index e731f5080ae..51111fb1f4d 100644 --- a/.api-reports/api-report-react.api.md +++ b/.api-reports/api-report-react.api.md @@ -722,8 +722,6 @@ class QueryInfo { init(query: { document: DocumentNode; variables: Record | undefined; - observableQuery?: ObservableQuery; - lastRequestId?: number; }): this; // (undocumented) lastRequestId: number; diff --git a/.api-reports/api-report-react_hooks.api.md b/.api-reports/api-report-react_hooks.api.md index c5c1a674922..111989cf991 100644 --- a/.api-reports/api-report-react_hooks.api.md +++ b/.api-reports/api-report-react_hooks.api.md @@ -538,8 +538,6 @@ class QueryInfo { init(query: { document: DocumentNode; variables: Record | undefined; - observableQuery?: ObservableQuery; - lastRequestId?: number; }): this; // (undocumented) lastRequestId: number; diff --git a/.api-reports/api-report.api.md b/.api-reports/api-report.api.md index 20a33d461bf..c0825bc0dc6 100644 --- a/.api-reports/api-report.api.md +++ b/.api-reports/api-report.api.md @@ -1795,8 +1795,6 @@ class QueryInfo { init(query: { document: DocumentNode; variables: Record | undefined; - observableQuery?: ObservableQuery; - lastRequestId?: number; }): this; // (undocumented) lastRequestId: number; diff --git a/.size-limits.json b/.size-limits.json index de51c1c6bed..fa43ad241eb 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,6 +1,6 @@ { - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 42563, - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 37833, - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 32930, - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27693 + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 42554, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 37874, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 32871, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27681 } diff --git a/src/core/QueryInfo.ts b/src/core/QueryInfo.ts index 60c16733a20..2893b828bcc 100644 --- a/src/core/QueryInfo.ts +++ b/src/core/QueryInfo.ts @@ -99,8 +99,6 @@ export class QueryInfo { public init(query: { document: DocumentNode; variables: Record | undefined; - observableQuery?: ObservableQuery; - lastRequestId?: number; }): this { if (!equal(query.variables, this.variables)) { this.lastDiff = void 0; @@ -111,17 +109,8 @@ export class QueryInfo { Object.assign(this, { document: query.document, variables: query.variables, - networkError: null, }); - if (query.observableQuery) { - this.setObservableQuery(query.observableQuery); - } - - if (query.lastRequestId) { - this.lastRequestId = query.lastRequestId; - } - return this; } diff --git a/src/core/QueryManager.ts b/src/core/QueryManager.ts index ae94f74219a..53cec3c6b5f 100644 --- a/src/core/QueryManager.ts +++ b/src/core/QueryManager.ts @@ -814,11 +814,8 @@ export class QueryManager { // We give queryInfo the transformed query to ensure the first cache diff // uses the transformed query instead of the raw query - queryInfo.init({ - document: query, - observableQuery: observable, - variables: observable.variables, - }); + queryInfo.init({ document: query, variables: observable.variables }); + queryInfo.setObservableQuery(observable); return observable; }