diff --git a/src/core/ObservableQuery.ts b/src/core/ObservableQuery.ts index d32122ee0b5..0ca64231bb8 100644 --- a/src/core/ObservableQuery.ts +++ b/src/core/ObservableQuery.ts @@ -60,7 +60,7 @@ export class ObservableQuery< // Original value of this.options.fetchPolicy (defaulting to "cache-first"), // from whenever the ObservableQuery was first created. - public initialFetchPolicy: WatchQueryFetchPolicy; + private initialFetchPolicy: WatchQueryFetchPolicy; private isTornDown: boolean; private queryManager: QueryManager; diff --git a/src/core/__tests__/ObservableQuery.ts b/src/core/__tests__/ObservableQuery.ts index d1b585fe71e..33a2ad5bbbb 100644 --- a/src/core/__tests__/ObservableQuery.ts +++ b/src/core/__tests__/ObservableQuery.ts @@ -1197,7 +1197,7 @@ describe('ObservableQuery', () => { }); expect(observable.options.fetchPolicy).toBe('cache-and-network'); - expect(observable.initialFetchPolicy).toBe('cache-and-network'); + expect(observable["initialFetchPolicy"]).toBe('cache-and-network'); subscribeAndCount(reject, observable, (handleCount, result) => { expect(result.error).toBeUndefined();