private async Task <IEnumerable <Series> > GetSeriesFunc(IResolveFieldContext <object> context) { var seriesId = context.GetArgument <string>("seriesId"); if (seriesId != null) { var series = await _seriesEngine.GetSeries(seriesId); return(new List <Series> { series }); } return(await _seriesEngine.GetAll()); }
public async Task <IActionResult> GetSeries() { var series = await _seriesEngine.GetAll(); return(Ok(series)); }