import { DocumentNode } from 'graphql'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { MissingFieldError } from './common'; import { Reference } from '../../../utilities'; export declare namespace DataProxy { interface Query { query: DocumentNode | TypedDocumentNode; variables?: TVariables; id?: string; } interface Fragment { id?: string; fragment: DocumentNode | TypedDocumentNode; fragmentName?: string; variables?: TVariables; } interface ReadQueryOptions extends Query { returnPartialData?: boolean; optimistic?: boolean; canonizeResults?: boolean; } interface ReadFragmentOptions extends Fragment { returnPartialData?: boolean; optimistic?: boolean; canonizeResults?: boolean; } interface WriteOptions { data: TData; broadcast?: boolean; overwrite?: boolean; } interface WriteQueryOptions extends Query, WriteOptions { } interface WriteFragmentOptions extends Fragment, WriteOptions { } interface UpdateQueryOptions extends Omit<(ReadQueryOptions & WriteQueryOptions), 'data'> { } interface UpdateFragmentOptions extends Omit<(ReadFragmentOptions & WriteFragmentOptions), 'data'> { } type DiffResult = { result?: T; complete?: boolean; missing?: MissingFieldError[]; fromOptimisticTransaction?: boolean; }; } export interface DataProxy { readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): QueryType | null; readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; } //# sourceMappingURL=DataProxy.d.ts.map