import { Observable } from 'rxjs' ; import { Metadata } from 'grpc' ; import { IId , IQuery , ICount } from '../commons/commons.interface' ; import { Post , PostsConnection } from '../graphql/typings' ; import { PostDto } from './post.dto' ; interface UpdatePostInput { id : string ; data : PostDto ; } export interface IPostsService { find ( query , metadata ? ) : Observable < PostsConnection > ; findById ( id , metadata ? ) : Observable < Post > ; findOne ( query , metadata ? ) : Observable < Post > ; count ( query , metadata ? ) : Observable < ICount > ; create ( input , metadata ? ) : Observable < Post > ; update ( input , metadata ? ) : Observable < Post > ; destroy ( query , metadata ? ) : Observable < ICount > ; }