private async Task <object> Airport(ResolveFieldContext <object> context) { var airport = context.GetArgument <Airport>("airport"); Airport result; if (airport.AirportID == Guid.Empty) { result = await _airportRepository.AddAirport(airport); } else { result = await _airportRepository.UpdateAirport(airport); } if (result == null) { context.Errors.Add(new ExecutionError($"Could not find airport with specified airportID '{airport.AirportID}'. Nothing updated / added.")); } return(airport); }