Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .api-reports/api-report-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1680,8 +1680,6 @@ class QueryInfo {
init(query: {
document: DocumentNode;
variables: Record<string, any> | undefined;
observableQuery?: ObservableQuery<any, any>;
lastRequestId?: number;
}): this;
// (undocumented)
lastRequestId: number;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,6 @@ class QueryInfo {
init(query: {
document: DocumentNode;
variables: Record<string, any> | undefined;
observableQuery?: ObservableQuery<any, any>;
lastRequestId?: number;
}): this;
// (undocumented)
lastRequestId: number;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report-react_hooks.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,6 @@ class QueryInfo {
init(query: {
document: DocumentNode;
variables: Record<string, any> | undefined;
observableQuery?: ObservableQuery<any, any>;
lastRequestId?: number;
}): this;
// (undocumented)
lastRequestId: number;
Expand Down
2 changes: 0 additions & 2 deletions .api-reports/api-report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1795,8 +1795,6 @@ class QueryInfo {
init(query: {
document: DocumentNode;
variables: Record<string, any> | undefined;
observableQuery?: ObservableQuery<any, any>;
lastRequestId?: number;
}): this;
// (undocumented)
lastRequestId: number;
Expand Down
8 changes: 4 additions & 4 deletions .size-limits.json
Original file line number Diff line number Diff line change
@@ -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
}
11 changes: 0 additions & 11 deletions src/core/QueryInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ export class QueryInfo {
public init(query: {
document: DocumentNode;
variables: Record<string, any> | undefined;
observableQuery?: ObservableQuery<any, any>;
lastRequestId?: number;
}): this {
if (!equal(query.variables, this.variables)) {
this.lastDiff = void 0;
Expand All @@ -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;
}

Expand Down
7 changes: 2 additions & 5 deletions src/core/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down