import { type OperatorFunction } from 'rxjs'; import type { ApolloClient, GetDataState, ObservableQuery } from '@apollo/client/core'; type CompleteFragment = { complete: true; missing?: never; } & GetDataState; type ForWatchFragment = OperatorFunction, CompleteFragment>; /** * Filter emitted results to only receive results that are complete (`result.dataState === 'complete'`). * * This is a small wrapper around rxjs `filter()` for convenience only. * * If you use this, you should probably combine it with [`notifyOnNetworkStatusChange`](https://www.apollographql.com/docs/react/data/queries#queryhookoptions-interface-notifyonnetworkstatuschange). * This tells `@apollo/client` to not emit the first `partial` result, so `apollo-angular` does * not need to filter it out. The overall behavior is identical, but it saves some CPU cycles. * * So something like this: * * ```ts * apollo * .watchQuery({ * query: myQuery, * notifyOnNetworkStatusChange: false, // Adding this will save CPU cycles * }) * .valueChanges * .pipe(onlyCompleteData()) * .subscribe(result => { * // Do something with complete result * }); * ``` */ export declare function onlyCompleteData(): OperatorFunction, ObservableQuery.Result>; /** * @deprecated Use `onlyCompleteData()` instead. */ export declare const onlyComplete: typeof onlyCompleteData; /** * Same as `onlyCompleteData()` but for `Apollo.watchFragment()`. */ export declare function onlyCompleteFragment(): ForWatchFragment; export {};