| 346 | } |
| 347 | |
| 348 | pub async fn update_topic_synonyms( |
| 349 | &self, |
| 350 | input: graphql::UpdateTopicSynonymsInput, |
| 351 | ) -> Result<git::UpdateTopicSynonymsResult> { |
| 352 | let graphql::UpdateTopicSynonymsInput { |
| 353 | repo_id, |
| 354 | synonyms, |
| 355 | topic_id, |
| 356 | .. |
| 357 | } = input; |
| 358 | |
| 359 | git::UpdateTopicSynonyms { |
| 360 | actor: Arc::clone(&self.viewer), |
| 361 | repo_id: repo_id.try_into()?, |
| 362 | synonyms: synonyms |
| 363 | .iter() |
| 364 | .map(git::Synonym::try_from) |
| 365 | .collect::<Result<Vec<git::Synonym>>>()?, |
| 366 | topic_id: topic_id.try_into()?, |
| 367 | } |
| 368 | .call(self.mutation()?, &self.redis) |
| 369 | } |
| 370 | |
| 371 | pub async fn upsert_link( |
| 372 | &self, |