diff --git a/src/Linq2GraphQL.Client/GraphClient.cs b/src/Linq2GraphQL.Client/GraphClient.cs index d98a4d73..46087a2b 100644 --- a/src/Linq2GraphQL.Client/GraphClient.cs +++ b/src/Linq2GraphQL.Client/GraphClient.cs @@ -22,10 +22,10 @@ public GraphClient(HttpClient httpClient, IOptions options, HttpClient = httpClient; - SerializerOptions = new JsonSerializerOptions + SerializerOptions = new() { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - WriteIndented = true + Converters = { } }; SubscriptionUrl = GetSubscriptionUrl(); diff --git a/src/Linq2GraphQL.Client/QueryExecutor.cs b/src/Linq2GraphQL.Client/QueryExecutor.cs index cf4061e0..154175b8 100644 --- a/src/Linq2GraphQL.Client/QueryExecutor.cs +++ b/src/Linq2GraphQL.Client/QueryExecutor.cs @@ -40,8 +40,8 @@ public T ProcessResponse(string con, string name, string query) throw new GraphQueryExecutionException(errors, query); } - var hasData = document.RootElement.TryGetProperty(dataPathPropertyName, out var dataElement); - var hasResult = dataElement.TryGetProperty(name, out var resultElement); + document.RootElement.TryGetProperty(dataPathPropertyName, out var dataElement); + dataElement.TryGetProperty(name, out var resultElement); if (resultElement.ValueKind == JsonValueKind.Null) { diff --git a/src/Linq2GraphQL.Generator/Properties/launchSettings.json b/src/Linq2GraphQL.Generator/Properties/launchSettings.json index 7adb1150..d96bdd8e 100644 --- a/src/Linq2GraphQL.Generator/Properties/launchSettings.json +++ b/src/Linq2GraphQL.Generator/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "Linq2GraphQL.Generator": { "commandName": "Project", - "commandLineArgs": "https://localhost:50741/graphql/ -c=\"SampleNullableClient\" -n=\"Linq2GraphQL.TestClientNullable\" -o=\"C:\\Code\\Github\\Linq2GraphQL.Client\\test\\Linq2GraphQL.TestClientNullable\\Generated\" -s=true -nu=true" + "commandLineArgs": "https://localhost:7184/graphql/ -c=\"SampleClient\" -n=\"Linq2GraphQL.TestClient\" -o=\"C:\\Code\\Linq2GraphQL.Client\\test\\Linq2GraphQL.TestClient\\Generated\" -s=true" } } } \ No newline at end of file diff --git a/src/Linq2GraphQL.Generator/Templates/Client/ClientExtensionsTemplate.cs b/src/Linq2GraphQL.Generator/Templates/Client/ClientExtensionsTemplate.cs index 559a0c0b..279c0563 100644 --- a/src/Linq2GraphQL.Generator/Templates/Client/ClientExtensionsTemplate.cs +++ b/src/Linq2GraphQL.Generator/Templates/Client/ClientExtensionsTemplate.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 17.0.0.0 +// Runtime Version: 16.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -15,8 +15,8 @@ namespace Linq2GraphQL.Generator.Templates.Client /// Class to produce the template output /// - #line 1 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] + #line 1 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public partial class ClientExtensionsTemplate : ClientExtensionsTemplateBase { #line hidden @@ -25,82 +25,65 @@ public partial class ClientExtensionsTemplate : ClientExtensionsTemplateBase /// public virtual string TransformText() { - this.Write("using Linq2GraphQL.Client;\r\nusing Microsoft.Extensions.DependencyInjection;\r\nusin" + - "g Microsoft.Extensions.Options;\r\n\r\nnamespace "); + this.Write("using Linq2GraphQL.Client;\r\nusing Microsoft.Extensions.DependencyInjection;\r\nusing Microsoft.Extensions.Options;\r\n\r\nnamespace "); - #line 7 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 7 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(namespaceName)); #line default #line hidden this.Write(";\r\n\r\npublic static class "); - #line 9 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 9 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(clientName)); #line default #line hidden this.Write("Extensions \r\n{\r\n private const string ClientName = \""); - #line 11 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 11 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(clientName)); #line default #line hidden this.Write("\";\r\n \r\n public static IGraphClientBuilder<"); - #line 13 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 13 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(clientName)); #line default #line hidden this.Write("> Add"); - #line 13 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 13 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(clientName)); #line default #line hidden - this.Write("(this IServiceCollection services)\r\n {\r\n var graphClientOptions = new G" + - "raphClientOptions();\r\n return GraphClientBuilder(services, graphClientOpt" + - "ions);\r\n }\r\n \r\n public static IGraphClientBuilder<"); + this.Write("(this IServiceCollection services)\r\n {\r\n var graphClientOptions = new GraphClientOptions();\r\n return GraphClientBuilder(services, graphClientOptions);\r\n }\r\n \r\n public static IGraphClientBuilder<"); - #line 19 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 19 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(clientName)); #line default #line hidden this.Write("> Add"); - #line 19 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 19 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(clientName)); #line default #line hidden - this.Write(@"(this IServiceCollection services, Action opts) - { - var graphClientOptions = new GraphClientOptions(); - opts(graphClientOptions); - - return GraphClientBuilder(services, graphClientOptions); - } - - private static IGraphClientBuilder<"); + this.Write("(this IServiceCollection services, Action opts)\r\n {\r\n var graphClientOptions = new GraphClientOptions();\r\n opts(graphClientOptions);\r\n \r\n return GraphClientBuilder(services, graphClientOptions);\r\n }\r\n\r\n private static IGraphClientBuilder<"); - #line 27 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 27 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(clientName)); #line default #line hidden - this.Write(@"> GraphClientBuilder(IServiceCollection services, - GraphClientOptions graphClientOptions) - { - var opts = Options.Create(graphClientOptions); - services.AddSingleton(opts); - services.AddMemoryCache(); - return new ClientBuilder<"); + this.Write("> GraphClientBuilder(IServiceCollection services,\r\n GraphClientOptions graphClientOptions)\r\n {\r\n var opts = Options.Create(graphClientOptions);\r\n services.AddKeyedSingleton(ClientName, opts); \r\n services.AddMemoryCache(); \r\n return new ClientBuilder<"); - #line 33 "C:\Code\DevOps\Linq2GraphQL\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" + #line 33 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientExtensionsTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(clientName)); #line default @@ -116,7 +99,7 @@ public virtual string TransformText() /// /// Base class for this transformation /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public class ClientExtensionsTemplateBase { #region Fields @@ -131,7 +114,7 @@ public class ClientExtensionsTemplateBase /// /// The string builder that generation-time code is using to assemble generated output /// - public System.Text.StringBuilder GenerationEnvironment + protected System.Text.StringBuilder GenerationEnvironment { get { diff --git a/src/Linq2GraphQL.Generator/Templates/Client/ClientExtensionsTemplate.tt b/src/Linq2GraphQL.Generator/Templates/Client/ClientExtensionsTemplate.tt index 2a78d65d..1386dfe3 100644 --- a/src/Linq2GraphQL.Generator/Templates/Client/ClientExtensionsTemplate.tt +++ b/src/Linq2GraphQL.Generator/Templates/Client/ClientExtensionsTemplate.tt @@ -28,7 +28,7 @@ public static class <#= clientName #>Extensions GraphClientOptions graphClientOptions) { var opts = Options.Create(graphClientOptions); - services.AddSingleton(opts); + services.AddKeyedSingleton(ClientName, opts); services.AddMemoryCache(); return new ClientBuilder<<#= clientName #>>(ClientName, services); } diff --git a/src/Linq2GraphQL.Generator/Templates/Client/ClientTemplate.cs b/src/Linq2GraphQL.Generator/Templates/Client/ClientTemplate.cs index c0a27816..34442f50 100644 --- a/src/Linq2GraphQL.Generator/Templates/Client/ClientTemplate.cs +++ b/src/Linq2GraphQL.Generator/Templates/Client/ClientTemplate.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 17.0.0.0 +// Runtime Version: 16.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -15,8 +15,8 @@ namespace Linq2GraphQL.Generator.Templates.Client /// Class to produce the template output /// - #line 1 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] + #line 1 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public partial class ClientTemplate : ClientTemplateBase { #line hidden @@ -25,149 +25,152 @@ public partial class ClientTemplate : ClientTemplateBase /// public virtual string TransformText() { - this.Write("using Linq2GraphQL.Client;\r\nusing Microsoft.Extensions.Caching.Memory;\r\nusing Mic" + - "rosoft.Extensions.DependencyInjection;\r\nusing Microsoft.Extensions.Options;\r\n\r\nn" + - "amespace "); + this.Write("using Linq2GraphQL.Client;\r\nusing Microsoft.Extensions.Caching.Memory;\r\nusing Microsoft.Extensions.DependencyInjection;\r\nusing Microsoft.Extensions.Options;\r\n\r\nnamespace "); - #line 8 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 8 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(namespaceName)); #line default #line hidden this.Write(";\r\n\r\npublic class "); - #line 10 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 10 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(name)); #line default #line hidden this.Write("\r\n{\r\n public "); - #line 12 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 12 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(name)); #line default #line hidden - this.Write("(HttpClient httpClient, IOptions options, IServiceProvider pr" + - "ovider)\r\n {\r\n var client = new GraphClient(httpClient, options, provid" + - "er);\r\n"); + this.Write("(HttpClient httpClient, [FromKeyedServices(\""); - #line 15 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 12 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(name)); + + #line default + #line hidden + this.Write("\")]IOptions options, IServiceProvider provider)\r\n {\r\n var client = new GraphClient(httpClient, options, provider);\r\n"); + + #line 15 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" if (includeQuery) { #line default #line hidden this.Write(" Query = new "); - #line 16 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 16 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetMehodName(queryType))); #line default #line hidden this.Write("(client);\r\n"); - #line 17 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 17 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" } #line default #line hidden - #line 18 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 18 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" if (includeMutation) { #line default #line hidden this.Write(" Mutation = new "); - #line 19 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 19 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetMehodName(mutationType))); #line default #line hidden this.Write("(client);\r\n"); - #line 20 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 20 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" } #line default #line hidden - #line 21 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 21 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" if (includeSubscriptions) { #line default #line hidden this.Write(" Subscription = new "); - #line 22 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 22 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetMehodName(subscriptionType))); #line default #line hidden this.Write("(client); \r\n"); - #line 23 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 23 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" } #line default #line hidden this.Write(" }\r\n\r\n"); - #line 26 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 26 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" if (includeQuery) { #line default #line hidden this.Write(" public "); - #line 27 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 27 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetMehodName(queryType))); #line default #line hidden this.Write(" Query { get; private set; }\r\n"); - #line 28 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 28 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" } #line default #line hidden - #line 29 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 29 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" if (includeMutation) { #line default #line hidden this.Write(" public "); - #line 30 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 30 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetMehodName(mutationType))); #line default #line hidden this.Write(" Mutation { get; private set; }\r\n"); - #line 31 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 31 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" } #line default #line hidden - #line 32 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 32 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" if (includeSubscriptions) { #line default #line hidden this.Write(" public "); - #line 33 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 33 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetMehodName(subscriptionType))); #line default #line hidden this.Write(" Subscription { get; private set; }\r\n"); - #line 34 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" + #line 34 "C:\Code\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Client\ClientTemplate.tt" } #line default @@ -183,7 +186,7 @@ public virtual string TransformText() /// /// Base class for this transformation /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public class ClientTemplateBase { #region Fields @@ -198,7 +201,7 @@ public class ClientTemplateBase /// /// The string builder that generation-time code is using to assemble generated output /// - public System.Text.StringBuilder GenerationEnvironment + protected System.Text.StringBuilder GenerationEnvironment { get { diff --git a/src/Linq2GraphQL.Generator/Templates/Client/ClientTemplate.tt b/src/Linq2GraphQL.Generator/Templates/Client/ClientTemplate.tt index 6a642660..edfa576d 100644 --- a/src/Linq2GraphQL.Generator/Templates/Client/ClientTemplate.tt +++ b/src/Linq2GraphQL.Generator/Templates/Client/ClientTemplate.tt @@ -8,8 +8,8 @@ using Microsoft.Extensions.Options; namespace <#= namespaceName #>; public class <#= name #> -{ - public <#= name #>(HttpClient httpClient, IOptions options, IServiceProvider provider) +{ + public <#= name #>(HttpClient httpClient, [FromKeyedServices("<#= name #>")]IOptions options, IServiceProvider provider) { var client = new GraphClient(httpClient, options, provider); <# if (includeQuery) { #> diff --git a/test/Linq2GraphQL.Console/Program.cs b/test/Linq2GraphQL.Console/Program.cs index 1a57b9cd..85fe8887 100644 --- a/test/Linq2GraphQL.Console/Program.cs +++ b/test/Linq2GraphQL.Console/Program.cs @@ -38,13 +38,15 @@ var services = serviceProvider.BuildServiceProvider(); var sampleClient = services.GetRequiredService(); -var starWarsClient = services.GetRequiredService(); - -var films = await starWarsClient - .Query - .AllFilms(null, 2, null, null) - .Include(e => e.Films.Select(e => e.VehicleConnection(null, 2, null, null))) - .Select(e=> e.Films) - .ExecuteAsync(); + +var animals = await sampleClient.Query.Animals().Select().ExecuteAsync(); +// var starWarsClient = services.GetRequiredService(); +// +// var films = await starWarsClient +// .Query +// .AllFilms(null, 2, null, null) +// .Include(e => e.Films.Select(e => e.VehicleConnection(null, 2, null, null))) +// .Select(e=> e.Films) +// .ExecuteAsync(); Console.WriteLine("Goodby, World!"); \ No newline at end of file diff --git a/test/Linq2GraphQL.TestClient/Generated/Client/MutationMethods.cs b/test/Linq2GraphQL.TestClient/Generated/Client/MutationMethods.cs index 95a54fec..cac0dd73 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Client/MutationMethods.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Client/MutationMethods.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System.Collections.Generic; using System; using Linq2GraphQL.Client; diff --git a/test/Linq2GraphQL.TestClient/Generated/Client/QueryMethods.cs b/test/Linq2GraphQL.TestClient/Generated/Client/QueryMethods.cs index 5e4c6a7d..0d10de9e 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Client/QueryMethods.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Client/QueryMethods.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System.Collections.Generic; using System; using Linq2GraphQL.Client; diff --git a/test/Linq2GraphQL.TestClient/Generated/Client/SampleClient.cs b/test/Linq2GraphQL.TestClient/Generated/Client/SampleClient.cs index bc160c1f..b07b0bec 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Client/SampleClient.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Client/SampleClient.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using Linq2GraphQL.Client; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.DependencyInjection; @@ -7,7 +14,7 @@ namespace Linq2GraphQL.TestClient; public class SampleClient { - public SampleClient(HttpClient httpClient, IOptions options, IServiceProvider provider) + public SampleClient(HttpClient httpClient, [FromKeyedServices("SampleClient")]IOptions options, IServiceProvider provider) { var client = new GraphClient(httpClient, options, provider); Query = new QueryMethods(client); diff --git a/test/Linq2GraphQL.TestClient/Generated/Client/SampleClientExtensions.cs b/test/Linq2GraphQL.TestClient/Generated/Client/SampleClientExtensions.cs index f48c7e87..78d6abef 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Client/SampleClientExtensions.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Client/SampleClientExtensions.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using Linq2GraphQL.Client; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -26,7 +33,7 @@ private static IGraphClientBuilder GraphClientBuilder(IServiceColl GraphClientOptions graphClientOptions) { var opts = Options.Create(graphClientOptions); - services.AddSingleton(opts); + services.AddKeyedSingleton(ClientName, opts); services.AddMemoryCache(); return new ClientBuilder(ClientName, services); } diff --git a/test/Linq2GraphQL.TestClient/Generated/Client/SubscriptionMethods.cs b/test/Linq2GraphQL.TestClient/Generated/Client/SubscriptionMethods.cs index 4afe39bb..aef2bfe7 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Client/SubscriptionMethods.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Client/SubscriptionMethods.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System.Collections.Generic; using System; using Linq2GraphQL.Client; diff --git a/test/Linq2GraphQL.TestClient/Generated/Enums/AddressType.cs b/test/Linq2GraphQL.TestClient/Generated/Enums/AddressType.cs index d858a0fa..cb2c1a3b 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Enums/AddressType.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Enums/AddressType.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using Linq2GraphQL.Client; using System.Runtime.Serialization; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Enums/CustomerStatus.cs b/test/Linq2GraphQL.TestClient/Generated/Enums/CustomerStatus.cs index 328330ec..82009d9a 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Enums/CustomerStatus.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Enums/CustomerStatus.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using Linq2GraphQL.Client; using System.Runtime.Serialization; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Enums/SortEnumType.cs b/test/Linq2GraphQL.TestClient/Generated/Enums/SortEnumType.cs index 87f587f0..0b6660e9 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Enums/SortEnumType.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Enums/SortEnumType.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using Linq2GraphQL.Client; using System.Runtime.Serialization; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressFilterInput.cs index 3709b72f..dea2936e 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressInput.cs index 326c0b8a..411279a6 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressSortInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressSortInput.cs index b3d675a5..e59a24b3 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressSortInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/AddressSortInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerFilterInput.cs index 42c2cb96..7c6808c9 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerInput.cs index b2ab39f3..95f9e7ed 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerSortInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerSortInput.cs index 87ee28b9..bea06419 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerSortInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerSortInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerStatusOperationFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerStatusOperationFilterInput.cs index 59fedc49..e75f1cd6 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerStatusOperationFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/CustomerStatusOperationFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/DateTimeOperationFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/DateTimeOperationFilterInput.cs index 8bd0d513..92bb4c8b 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/DateTimeOperationFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/DateTimeOperationFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/DecimalOperationFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/DecimalOperationFilterInput.cs index 665a34ad..dac4f3dd 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/DecimalOperationFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/DecimalOperationFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/FloatOperationFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/FloatOperationFilterInput.cs index 086e52ac..abc03cbb 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/FloatOperationFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/FloatOperationFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalFilterInput.cs index 6db462dd..2047475c 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalSortInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalSortInput.cs index 633f2072..6afaa402 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalSortInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalSortInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/InputFactory.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/InputFactory.cs index 65ab52f8..f2d4b3aa 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/InputFactory.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/InputFactory.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/IntOperationFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/IntOperationFilterInput.cs index 1a885b79..5dbeb704 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/IntOperationFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/IntOperationFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/ItemFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/ItemFilterInput.cs index 4f46b0ac..f288e372 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/ItemFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/ItemFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/ItemInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/ItemInput.cs index 6f08c2f1..de04c6a2 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/ItemInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/ItemInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderFilterInput.cs index d22f500c..d343971d 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderLineFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderLineFilterInput.cs index 796b3eee..f08e93eb 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderLineFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderLineFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderFilterInput.cs index 1de27544..820cfc6d 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderInput.cs index b6eddf15..82a758f4 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineFilterInput.cs index 19558eb5..a6208f40 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineInput.cs index 689478d8..9a40d55b 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderSortInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderSortInput.cs index 74856782..a29e0aa8 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderSortInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/OrderSortInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/StringOperationFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/StringOperationFilterInput.cs index 88bc9170..9e959c0a 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/StringOperationFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/StringOperationFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/TimeSpanOperationFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/TimeSpanOperationFilterInput.cs index fb494211..7b148966 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/TimeSpanOperationFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/TimeSpanOperationFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Inputs/UuidOperationFilterInput.cs b/test/Linq2GraphQL.TestClient/Generated/Inputs/UuidOperationFilterInput.cs index 6945a887..58df165b 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Inputs/UuidOperationFilterInput.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Inputs/UuidOperationFilterInput.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/test/Linq2GraphQL.TestClient/Generated/Interfaces/IAnimal.cs b/test/Linq2GraphQL.TestClient/Generated/Interfaces/IAnimal.cs index 3d4692b4..3e76ed0d 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Interfaces/IAnimal.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Interfaces/IAnimal.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Text.Json; using System.Text.Json.Nodes; diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/Address.cs b/test/Linq2GraphQL.TestClient/Generated/Types/Address.cs index fc17e272..d88d1934 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/Address.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/Address.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -10,12 +17,12 @@ namespace Linq2GraphQL.TestClient; public partial class Address : GraphQLTypeBase { [JsonPropertyName("name")] - public string Name { get; set; } + public string Name { get; set; } [JsonPropertyName("street")] - public string Street { get; set; } + public string Street { get; set; } [JsonPropertyName("postalCode")] - public string PostalCode { get; set; } + public string PostalCode { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/AnimalsConnection.cs b/test/Linq2GraphQL.TestClient/Generated/Types/AnimalsConnection.cs index 9069bf81..23593c72 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/AnimalsConnection.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/AnimalsConnection.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,18 +14,33 @@ namespace Linq2GraphQL.TestClient; +/// +/// A connection to a list of items. +/// public partial class AnimalsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// [JsonPropertyName("edges")] - public List Edges { get; set; } + public List Edges { get; set; } + /// + /// A flattened list of the nodes. + /// [JsonPropertyName("nodes")] - public List Nodes { get; set; } + public List Nodes { get; set; } + /// + /// Identifies the total count of items in the connection. + /// [JsonPropertyName("totalCount")] - public int TotalCount { get; set; } + public int TotalCount { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/AnimalsEdge.cs b/test/Linq2GraphQL.TestClient/Generated/Types/AnimalsEdge.cs index e30c07b6..e57747a6 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/AnimalsEdge.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/AnimalsEdge.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,12 +14,21 @@ namespace Linq2GraphQL.TestClient; +/// +/// An edge in a connection. +/// public partial class AnimalsEdge : GraphQLTypeBase { + /// + /// A cursor for use in pagination. + /// [JsonPropertyName("cursor")] - public string Cursor { get; set; } + public string Cursor { get; set; } + /// + /// The item at the end of the edge. + /// [JsonPropertyName("node")] - public IAnimal Node { get; set; } + public IAnimal Node { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/CollectionSegmentInfo.cs b/test/Linq2GraphQL.TestClient/Generated/Types/CollectionSegmentInfo.cs index d95b46d6..7b954630 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/CollectionSegmentInfo.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/CollectionSegmentInfo.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,12 +14,21 @@ namespace Linq2GraphQL.TestClient; +/// +/// Information about the offset pagination. +/// public partial class CollectionSegmentInfo : GraphQLTypeBase { + /// + /// Indicates whether more items exist following the set defined by the clients arguments. + /// [JsonPropertyName("hasNextPage")] - public bool HasNextPage { get; set; } + public bool HasNextPage { get; set; } + /// + /// Indicates whether more items exist prior the set defined by the clients arguments. + /// [JsonPropertyName("hasPreviousPage")] - public bool HasPreviousPage { get; set; } + public bool HasPreviousPage { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/Customer.cs b/test/Linq2GraphQL.TestClient/Generated/Types/Customer.cs index e720784d..9990953c 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/Customer.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/Customer.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -10,18 +17,18 @@ namespace Linq2GraphQL.TestClient; public partial class Customer : GraphQLTypeBase { [JsonPropertyName("customerId")] - public Guid CustomerId { get; set; } + public Guid CustomerId { get; set; } [JsonPropertyName("customerName")] - public string CustomerName { get; set; } + public string CustomerName { get; set; } [JsonPropertyName("status")] - public CustomerStatus Status { get; set; } + public CustomerStatus Status { get; set; } [JsonPropertyName("orders")] - public List Orders { get; set; } + public List Orders { get; set; } [JsonPropertyName("address")] - public Address Address { get; set; } + public Address Address { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/Item.cs b/test/Linq2GraphQL.TestClient/Generated/Types/Item.cs index 787aa3d6..d4dd7206 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/Item.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/Item.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -10,9 +17,9 @@ namespace Linq2GraphQL.TestClient; public partial class Item : GraphQLTypeBase { [JsonPropertyName("itemId")] - public string ItemId { get; set; } + public string ItemId { get; set; } [JsonPropertyName("itemName")] - public string ItemName { get; set; } + public string ItemName { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/Order.cs b/test/Linq2GraphQL.TestClient/Generated/Types/Order.cs index 86dbc64a..2665e4bc 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/Order.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/Order.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -12,13 +19,13 @@ public static class OrderExtensions [GraphMethod("orderHello")] public static string OrderHello(this Order order, [GraphArgument("String!")] string name, [GraphArgument("Int!")] int first) { - return order.GetMethodValue("orderHello", name, first); + return order.GetMethodValue("orderHello", name, first); } [GraphMethod("orderAddress")] public static Address OrderAddress(this Order order, [GraphArgument("AddressType!")] AddressType addressType) { - return order.GetMethodValue
("orderAddress", addressType); + return order.GetMethodValue
("orderAddress", addressType); } } @@ -40,21 +47,21 @@ public partial class Order : GraphQLTypeBase public Address OrderAddress => _orderAddress.Value(() => GetFirstMethodValue
("orderAddress")); [JsonPropertyName("orderId")] - public Guid OrderId { get; set; } + public Guid OrderId { get; set; } [JsonPropertyName("customer")] - public Customer Customer { get; set; } + public Customer Customer { get; set; } [JsonPropertyName("address")] - public Address Address { get; set; } + public Address Address { get; set; } [JsonPropertyName("orderDate")] - public DateTimeOffset OrderDate { get; set; } + public DateTimeOffset OrderDate { get; set; } [JsonPropertyName("lines")] - public List Lines { get; set; } + public List Lines { get; set; } [JsonPropertyName("entryTime")] - public TimeSpan? EntryTime { get; set; } + public TimeSpan? EntryTime { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/OrderLine.cs b/test/Linq2GraphQL.TestClient/Generated/Types/OrderLine.cs index 0c9754ab..0780f4d3 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/OrderLine.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/OrderLine.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -10,18 +17,18 @@ namespace Linq2GraphQL.TestClient; public partial class OrderLine : GraphQLTypeBase { [JsonPropertyName("lineNumber")] - public int LineNumber { get; set; } + public int LineNumber { get; set; } [JsonPropertyName("order")] - public Order Order { get; set; } + public Order Order { get; set; } [JsonPropertyName("item")] - public Item Item { get; set; } + public Item Item { get; set; } [JsonPropertyName("price")] - public decimal Price { get; set; } + public decimal Price { get; set; } [JsonPropertyName("quantity")] - public double Quantity { get; set; } + public double Quantity { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersConnection.cs b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersConnection.cs index 588502d0..ec5e9910 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersConnection.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersConnection.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,18 +14,33 @@ namespace Linq2GraphQL.TestClient; +/// +/// A connection to a list of items. +/// public partial class OrdersConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// [JsonPropertyName("edges")] - public List Edges { get; set; } + public List Edges { get; set; } + /// + /// A flattened list of the nodes. + /// [JsonPropertyName("nodes")] - public List Nodes { get; set; } + public List Nodes { get; set; } + /// + /// Identifies the total count of items in the connection. + /// [JsonPropertyName("totalCount")] - public int TotalCount { get; set; } + public int TotalCount { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersEdge.cs b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersEdge.cs index 44c98881..c1e6abd2 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersEdge.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersEdge.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,12 +14,21 @@ namespace Linq2GraphQL.TestClient; +/// +/// An edge in a connection. +/// public partial class OrdersEdge : GraphQLTypeBase { + /// + /// A cursor for use in pagination. + /// [JsonPropertyName("cursor")] - public string Cursor { get; set; } + public string Cursor { get; set; } + /// + /// The item at the end of the edge. + /// [JsonPropertyName("node")] - public Order Node { get; set; } + public Order Node { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationConnection.cs b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationConnection.cs index e3651689..2804a253 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationConnection.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationConnection.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,18 +14,33 @@ namespace Linq2GraphQL.TestClient; +/// +/// A connection to a list of items. +/// public partial class OrdersNoBackwardPaginationConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// [JsonPropertyName("edges")] - public List Edges { get; set; } + public List Edges { get; set; } + /// + /// A flattened list of the nodes. + /// [JsonPropertyName("nodes")] - public List Nodes { get; set; } + public List Nodes { get; set; } + /// + /// Identifies the total count of items in the connection. + /// [JsonPropertyName("totalCount")] - public int TotalCount { get; set; } + public int TotalCount { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationEdge.cs b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationEdge.cs index c08aa2f4..915963fd 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationEdge.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationEdge.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,12 +14,21 @@ namespace Linq2GraphQL.TestClient; +/// +/// An edge in a connection. +/// public partial class OrdersNoBackwardPaginationEdge : GraphQLTypeBase { + /// + /// A cursor for use in pagination. + /// [JsonPropertyName("cursor")] - public string Cursor { get; set; } + public string Cursor { get; set; } + /// + /// The item at the end of the edge. + /// [JsonPropertyName("node")] - public Order Node { get; set; } + public Order Node { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountConnection.cs b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountConnection.cs index 0b2b2ddc..ccc5a80d 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountConnection.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountConnection.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,15 +14,27 @@ namespace Linq2GraphQL.TestClient; +/// +/// A connection to a list of items. +/// public partial class OrdersNoTotalCountConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// [JsonPropertyName("edges")] - public List Edges { get; set; } + public List Edges { get; set; } + /// + /// A flattened list of the nodes. + /// [JsonPropertyName("nodes")] - public List Nodes { get; set; } + public List Nodes { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountEdge.cs b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountEdge.cs index 03dfc680..b86272b9 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountEdge.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountEdge.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,12 +14,21 @@ namespace Linq2GraphQL.TestClient; +/// +/// An edge in a connection. +/// public partial class OrdersNoTotalCountEdge : GraphQLTypeBase { + /// + /// A cursor for use in pagination. + /// [JsonPropertyName("cursor")] - public string Cursor { get; set; } + public string Cursor { get; set; } + /// + /// The item at the end of the edge. + /// [JsonPropertyName("node")] - public Order Node { get; set; } + public Order Node { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingCollectionSegment.cs b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingCollectionSegment.cs index 460e7928..05d99661 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingCollectionSegment.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingCollectionSegment.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -7,15 +14,24 @@ namespace Linq2GraphQL.TestClient; +/// +/// A segment of a collection. +/// public partial class OrdersOffsetPagingCollectionSegment : GraphQLTypeBase { + /// + /// Information to aid in pagination. + /// [JsonPropertyName("pageInfo")] - public CollectionSegmentInfo PageInfo { get; set; } + public CollectionSegmentInfo PageInfo { get; set; } + /// + /// A flattened list of the items. + /// [JsonPropertyName("items")] - public List Items { get; set; } + public List Items { get; set; } [JsonPropertyName("totalCount")] - public int TotalCount { get; set; } + public int TotalCount { get; set; } } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/Pig.cs b/test/Linq2GraphQL.TestClient/Generated/Types/Pig.cs index b934e97e..a59e9008 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/Pig.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/Pig.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -10,16 +17,16 @@ namespace Linq2GraphQL.TestClient; public partial class Pig : GraphQLTypeBase, IAnimal { [JsonPropertyName("name")] - public string Name { get; set; } + public string Name { get; set; } [JsonPropertyName("numberOfLegs")] - public int NumberOfLegs { get; set; } + public int NumberOfLegs { get; set; } [JsonPropertyName("speed")] - public int Speed { get; set; } + public int Speed { get; set; } [JsonPropertyName("spices")] - public string Spices { get; set; } + public string Spices { get; set; } [JsonPropertyName("__typename")] public string __TypeName { get; set; } diff --git a/test/Linq2GraphQL.TestClient/Generated/Types/Spider.cs b/test/Linq2GraphQL.TestClient/Generated/Types/Spider.cs index a58f37be..7dfdd752 100644 --- a/test/Linq2GraphQL.TestClient/Generated/Types/Spider.cs +++ b/test/Linq2GraphQL.TestClient/Generated/Types/Spider.cs @@ -1,3 +1,10 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Text.Json.Serialization; @@ -10,16 +17,16 @@ namespace Linq2GraphQL.TestClient; public partial class Spider : GraphQLTypeBase, IAnimal { [JsonPropertyName("name")] - public string Name { get; set; } + public string Name { get; set; } [JsonPropertyName("numberOfLegs")] - public int NumberOfLegs { get; set; } + public int NumberOfLegs { get; set; } [JsonPropertyName("speed")] - public int Speed { get; set; } + public int Speed { get; set; } [JsonPropertyName("poisonous")] - public bool Poisonous { get; set; } + public bool Poisonous { get; set; } [JsonPropertyName("__typename")] public string __TypeName { get; set; }