import { DataProxy } from 'apollo-cache' ; import { DocumentNode } from 'graphql' ; export type ResolveFn = ( _ : any , args : Record < string , any > , context : Context & Record < string , any > ) => Promise < any > | any ; export interface ReceivedContext { cache : DataProxy ; getCacheKey ( obj ) : string ; } export interface Context extends ReceivedContext { patchQuery ( query , producer ) : any ; patchFragment ( fragment , obj , producer ) : any ; writeData ( options ) : any ; }