private async Task <IEnumerable <Log> > GetLogFunc(IResolveFieldContext <object> context) { var logId = context.GetArgument <string>("logId"); if (logId != null) { var log = await _logEngine.GetLog(logId); return(new List <Log> { log }); } var missionId = context.GetArgument <string>("missionId"); if (missionId != null) { return(await _logEngine.GetLogsByMissionId(missionId)); } var seriesId = context.GetArgument <string>("seriesId"); if (seriesId != null) { return(await _logEngine.GetLogsBySeriesId(seriesId)); } return(await _logEngine.GetAll()); }