import { Injectable } from '@nestjs/common' ; import { CommandBus , QueryBus } from '@nestjs/cqrs' ; import { AddUserCommand } from './commands/add-user/add-user.command' ; import { GetUserInfoQuery } from './queries/get-user-info/get-user-info.query' ; import { User } from '@pimp-my-pr/shared/domain' ; @ Injectable ( ) export class UserFacade { constructor ( private commandBus , private queryBus ) { } addUser ( command ) { return this . commandBus . execute ( command ) ; } getUserInfo ( query ) { return this . queryBus . execute ( query ) ; } }