| 507 | } |
| 508 | |
| 509 | pub async fn consume_login_session( |
| 510 | &self, |
| 511 | session_id: &str, |
| 512 | ) -> Result<ConsumeLoginSessionPayload> { |
| 513 | let response = self |
| 514 | .unauthenticated_gql_client |
| 515 | .query_with_vars_unwrap::<ConsumeLoginSessionData, ConsumeLoginSessionVars>( |
| 516 | include_str!("queries/ConsumeLoginSession.gql"), |
| 517 | ConsumeLoginSessionVars { |
| 518 | session_id: session_id.to_string(), |
| 519 | }, |
| 520 | ) |
| 521 | .await; |
| 522 | match response { |
| 523 | Ok(response) => Ok(response.consume_login_session), |
| 524 | Err(err) => bail!("Failed to use login session: {err}"), |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | pub async fn compare_runs(&self, vars: CompareRunsVars) -> Result<CompareRunsOutcome> { |
| 529 | let response = self |