feat: new graphql query

This commit is contained in:
Mikhail Shabanov committed 2022-07-21 14:19:35 +02:00
1 parent 8c490edcc6
commit 703e16fc39
4 files changed
+111

No files matched your search

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using HotChocolate.Types;
using WotBlitzStatisticsPro.Common.Model;
using WotBlitzStatisticsPro.Logic;
namespace WotBlitzStatisticsPro.GraphQl.Query
{
[ExtendObjectType(Name = "Query")]
public class VehiclesQuery
{
/// <summary>
/// Returns a list of all vehicles of one nation
/// </summary>
/// <param name="nationId">Nation</param>
/// <param name="language">Request language</param>
/// <returns>A list of vehicles</returns>
public async Task<List<VehicleResponse>> GetVehicles(string nationId, RequestLanguage? language)
{
return new List<VehicleResponse>();
}
}
}
+1
View File
@@ -91,6 +91,7 @@ namespace WotBlitzStatisticsPro.GraphQl
.AddType<WotBlitzAchievementsQuery>()
.AddType<TankInfoResponseType>()
.AddType<WargamingAuthQuery>()
.AddType<VehiclesQuery>()
.AddMutationType(d => d.Name("Mutation"))
.AddType<WotBlitzStatisticsMutation>()
.AddType<AuthenticationMutation>()