feat: mutation metadatada added

This commit is contained in:
Mikhail Shabanov committed 2021-09-02 09:32:47 +02:00
1 parent 7d1d1b5ad6
commit 64ad05dc92
17 files changed
+422 -36

No files matched your search

@@ -34,14 +34,14 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
var loggedInInfo = await LocalStorageService.GetItemAsync<LoginInfo>(Constants.LoginInfoLocalStorageKey);
var settings = await LocalStorageService.ReadSettings();
CurrentRealmType = settings.RealmType;
if(loggedInInfo == null)
// Maybe add refresh button instead of calling mutation each time
if(loggedInInfo != null && loggedInInfo.AccountId == AccountId)
{
(AccountInfo, AchievementsBySection) = await GraphQlBackendService.GetPlayerInfo(AccountId, CurrentRealmType);
}
else
{
(AccountInfo, AchievementsBySection) = await GraphQlBackendService.CollectPlayerInfo(AccountId, CurrentRealmType, loggedInInfo.AccessToken);
await GraphQlBackendService.CollectPlayerInfo(AccountId, CurrentRealmType, loggedInInfo.AccessToken);
}
(AccountInfo, AchievementsBySection) = await GraphQlBackendService.GetPlayerInfo(AccountId, CurrentRealmType);
}
}
}