@rxdi/ui-components
Version:
UI Components for building graphql-server website
17 lines (13 loc) • 542 B
text/typescript
import { Effect } from '@rxdi/core';
import { PubSubService } from '@rxdi/graphql-pubsub';
import { OfType } from '@rxdi/graphql';
import { EffectTypes } from '../../introspection/EffectTypes';
import { IHamburgerStatisticsType } from '../../introspection';
()
export class HamburgerControllerEffect {
constructor(private pubsub: PubSubService) {}
(EffectTypes.clickHamburgerButton)
clickHamburgerButtonAction(result: IHamburgerStatisticsType) {
this.pubsub.publish(EffectTypes.clickHamburgerButton, result);
}
}