import { GraphQLSchema } from 'graphql'; import { QuerySubscription, SubscriptionCbk, GraphQLRunner } from './types'; export default class QuerySubscriptionHandler { protected subscriptions: Array; protected graphQLRunner: GraphQLRunner; protected schema: GraphQLSchema; protected nextsubid: number; constructor({graphQLRunner, schema}: { graphQLRunner: GraphQLRunner; schema: GraphQLSchema; }); register(query: string, variables: any, cbk: SubscriptionCbk): { subscription?: QuerySubscription; errors?: any; }; unregister(subscriptionId: string): boolean; onChange(collectionName: string, operation: string, _data: Array | any): void; protected doesMatch(filterOperator: string, filterValue: any, consideredValue: any): boolean; protected isBeforeOrWithinRange(digest: any, doc: any): boolean; protected passesFilters(digest: any, variables: any, doc: any): boolean; protected registerSubscription(subscription: QuerySubscription): QuerySubscriptionHandler; }