Replace the token this client uses for authenticated GraphQL requests and that the uploader pulls for its `Authorization` header. The single mutation point for the credentials.
(&mut self, token: Option<String>)
| 54 | /// requests and that the uploader pulls for its `Authorization` |
| 55 | /// header. The single mutation point for the credentials. |
| 56 | pub fn set_token(&mut self, token: Option<String>) { |
| 57 | self.gql_client = build_gql_api_client(token.as_deref(), self.api_url.clone()); |
| 58 | self.token = token; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | fn build_gql_api_client(token: Option<&str>, api_url: String) -> GQLClient { |
no test coverage detected