public ArticleController( IReadArticleService readArticleService, IWriteArticleService writeArticleService) { _readArticleService = readArticleService; _writeArticleService = writeArticleService; }
public ArticleMutation(IWriteArticleService writeArticleService) { _writeArticleService = writeArticleService; Field <ArticleType>( "addArticle", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <CreateArticleInputType> >() { Name = "article" } ), resolve: context => { var article = context.GetArgument <CreateArticleModel>("article"); return(_writeArticleService.Create(article)); }); RegisterDelete(); }