import { DataProxy } from '@apollo/client/cache'; import { ApolloClient } from '@apollo/client'; import { IClientService } from './services'; import { IWorkspaceContextService } from './workspace'; import { IEnvironmentService } from './environment'; import { INotificationService } from './notification'; import { IConfigurationService } from './configuration'; export interface ApolloContext extends ClientContext, IServerContext { } export interface ClientContext { cache: DataProxy; getCacheKey: (options: { __typename: string; resource?: string; id?: string; editorId?: string; }) => string; /** * Apollo Client * * @type {ApolloClient} * @memberof ClientContext */ client: ApolloClient & { container: IClientService; }; getClientServices: () => IClientService; } export interface IServerContext { workspaceConfigurationService: IWorkspaceContextService & IConfigurationService; environmentService: IEnvironmentService; notificationService: INotificationService; configurationService: IConfigurationService; store?: any; }