mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
Feat: Restuctured GraphQL Queries and added Backend call service into client. And regerated GraphQL client classes
This commit is contained in:
1 parent
d3d25fa62d
commit
4b5b12e87d
53 files changed
+1868
-1193
No files matched your search
@@ -1,38 +0,0 @@
|
||||
using HotChocolate.Types;
|
||||
using WotBlitzStatisticsPro.Common.Model;
|
||||
|
||||
namespace WotBlitzStatisticsPro.GraphQl.ObjectTypes
|
||||
{
|
||||
public class AccountsSearchObjectType: ObjectType<AccountsSearchResponse>
|
||||
{
|
||||
// ToDo: This is just for history. We don't need to paginate this because each page request does the request to API.
|
||||
// The database driver can optimize this and will request data page by page
|
||||
|
||||
//protected override void Configure(IObjectTypeDescriptor<AccountsSearchResponse> descriptor)
|
||||
//{
|
||||
// descriptor.Field(r => r.Accounts)
|
||||
// .UsePaging<AccountsSearchItemObjectType>();
|
||||
//}
|
||||
|
||||
/*
|
||||
Paging request example
|
||||
query($accountSearchNick: String!) {
|
||||
findAccounts(accountNick: $accountSearchNick) {
|
||||
accounts(first: 5, after: "eyJfX3RvdGFsQ291bnQiOjc0LCJfX3Bvc2l0aW9uIjo5fQ==") {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
totalCount
|
||||
nodes {
|
||||
accountId
|
||||
nickname
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
@@ -8,25 +7,34 @@
|
||||
"sslPort": 44333
|
||||
}
|
||||
},
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
//"launchUrl": "graphql",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
|
||||
},
|
||||
"WotBlitzStatistics.GraphQl": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
//"launchUrl": "graphql",
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
|
||||
},
|
||||
"WotBlitzStatistics.Mock": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"USE_GRAPH_QL_MOCK": "true"
|
||||
},
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using HotChocolate.Types;
|
||||
using WotBlitzStatisticsPro.Common.Model;
|
||||
@@ -29,7 +30,7 @@ namespace WotBlitzStatisticsPro.GraphQl.Query
|
||||
/// <param name="realmType">Wargaming Realm.</param>
|
||||
/// <param name="language">Language for the output data.</param>
|
||||
/// <returns></returns>
|
||||
public Task<AccountsSearchResponse> FindAccounts(
|
||||
public Task<ICollection<AccountsSearchResponseItem>> Players(
|
||||
string accountNick,
|
||||
RealmType? realmType,
|
||||
RequestLanguage? language)
|
||||
@@ -44,7 +45,7 @@ namespace WotBlitzStatisticsPro.GraphQl.Query
|
||||
/// <param name="realmType">Wargaming Realm.</param>
|
||||
/// <param name="language">Language for the output data.</param>
|
||||
/// <returns></returns>
|
||||
public Task<ClanSearchResponse> FindClans(
|
||||
public Task<ICollection<ClanSearchResponseItem>?> Clans(
|
||||
string searchString,
|
||||
RealmType? realmType,
|
||||
RequestLanguage? language)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -87,7 +88,6 @@ namespace WotBlitzStatisticsPro.GraphQl
|
||||
.AddType<WotBlitzStatisticsMutation>()
|
||||
.AddType<AuthenticationMutation>()
|
||||
.AddType<AccountsSearchItemObjectType>()
|
||||
.AddType<AccountsSearchObjectType>()
|
||||
.AddEnumType<MarkOfMastery>()
|
||||
.AddEnumType<RealmType>()
|
||||
.AddEnumType<RequestLanguage>()
|
||||
|
||||
Reference in new issue
Block a user