Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve processing of options.nextFetchPolicy #8465

Merged
merged 11 commits into from
Jul 9, 2021
Merged
Prev Previous commit
Next Next commit
Keep ObservableQuery initialFetchPolicy member private for now.
benjamn committed Jul 9, 2021

Verified

This commit was signed with the committer’s verified signature.
ruyadorno Ruy Adorno
commit 89126b625b17b5ad38c647e91a901f92d4cc4f05
2 changes: 1 addition & 1 deletion src/core/ObservableQuery.ts
Original file line number Diff line number Diff line change
@@ -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<any>;
2 changes: 1 addition & 1 deletion src/core/__tests__/ObservableQuery.ts
Original file line number Diff line number Diff line change
@@ -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();