From c76f8247edc020512be1e5d88e2eda211c5234e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Dang=C3=A5rden?= Date: Wed, 19 Mar 2025 16:39:13 +0100 Subject: [PATCH] Fixed Multiline description Regenerated StarWarsClient --- docs/Linq2GraphQL.Docs/Program.cs | 2 +- .../Generated/Client/RootMethods.cs | 7 + .../Generated/Client/StarWarsClient.cs | 9 +- .../Client/StarWarsClientExtensions.cs | 9 +- .../Generated/Inputs/InputFactory.cs | 7 + .../Generated/Interfaces/Node.cs | 15 +- docs/StarWars.Client/Generated/Types/Film.cs | 131 ++++++++------- .../Types/FilmCharactersConnection.cs | 55 ++++-- .../Generated/Types/FilmCharactersEdge.cs | 29 +++- .../Generated/Types/FilmPlanetsConnection.cs | 55 ++++-- .../Generated/Types/FilmPlanetsEdge.cs | 29 +++- .../Generated/Types/FilmSpeciesConnection.cs | 55 ++++-- .../Generated/Types/FilmSpeciesEdge.cs | 29 +++- .../Types/FilmStarshipsConnection.cs | 55 ++++-- .../Generated/Types/FilmStarshipsEdge.cs | 29 +++- .../Generated/Types/FilmVehiclesConnection.cs | 55 ++++-- .../Generated/Types/FilmVehiclesEdge.cs | 29 +++- .../Generated/Types/FilmsConnection.cs | 55 ++++-- .../Generated/Types/FilmsEdge.cs | 29 +++- .../Generated/Types/PeopleConnection.cs | 55 ++++-- .../Generated/Types/PeopleEdge.cs | 29 +++- .../StarWars.Client/Generated/Types/Person.cs | 144 ++++++++++------ .../Generated/Types/PersonFilmsConnection.cs | 55 ++++-- .../Generated/Types/PersonFilmsEdge.cs | 29 +++- .../Types/PersonStarshipsConnection.cs | 55 ++++-- .../Generated/Types/PersonStarshipsEdge.cs | 29 +++- .../Types/PersonVehiclesConnection.cs | 55 ++++-- .../Generated/Types/PersonVehiclesEdge.cs | 29 +++- .../StarWars.Client/Generated/Types/Planet.cs | 127 +++++++++----- .../Generated/Types/PlanetFilmsConnection.cs | 55 ++++-- .../Generated/Types/PlanetFilmsEdge.cs | 29 +++- .../Types/PlanetResidentsConnection.cs | 55 ++++-- .../Generated/Types/PlanetResidentsEdge.cs | 29 +++- .../Generated/Types/PlanetsConnection.cs | 55 ++++-- .../Generated/Types/PlanetsEdge.cs | 29 +++- .../Generated/Types/Species.cs | 132 ++++++++++----- .../Generated/Types/SpeciesConnection.cs | 55 ++++-- .../Generated/Types/SpeciesEdge.cs | 29 +++- .../Generated/Types/SpeciesFilmsConnection.cs | 55 ++++-- .../Generated/Types/SpeciesFilmsEdge.cs | 29 +++- .../Types/SpeciesPeopleConnection.cs | 55 ++++-- .../Generated/Types/SpeciesPeopleEdge.cs | 29 +++- .../Generated/Types/Starship.cs | 158 ++++++++++++------ .../Types/StarshipFilmsConnection.cs | 55 ++++-- .../Generated/Types/StarshipFilmsEdge.cs | 29 +++- .../Types/StarshipPilotsConnection.cs | 55 ++++-- .../Generated/Types/StarshipPilotsEdge.cs | 29 +++- .../Generated/Types/StarshipsConnection.cs | 55 ++++-- .../Generated/Types/StarshipsEdge.cs | 29 +++- .../Generated/Types/Vehicle.cs | 139 +++++++++------ .../Generated/Types/VehicleFilmsConnection.cs | 55 ++++-- .../Generated/Types/VehicleFilmsEdge.cs | 29 +++- .../Types/VehiclePilotsConnection.cs | 55 ++++-- .../Generated/Types/VehiclePilotsEdge.cs | 29 +++- .../Generated/Types/VehiclesConnection.cs | 55 ++++-- .../Generated/Types/VehiclesEdge.cs | 29 +++- docs/StarWars.Client/ReadMe.md | 6 + .../GraphQLSchema/Helpers.cs | 13 +- .../GraphQLSchema/RootSchema.cs | 10 +- .../Templates/Class/ClassTemplate.cs | 4 +- .../Templates/Class/ClassTemplate.tt | 4 +- 61 files changed, 1972 insertions(+), 793 deletions(-) create mode 100644 docs/StarWars.Client/ReadMe.md diff --git a/docs/Linq2GraphQL.Docs/Program.cs b/docs/Linq2GraphQL.Docs/Program.cs index a48ceeb5..583b29f1 100644 --- a/docs/Linq2GraphQL.Docs/Program.cs +++ b/docs/Linq2GraphQL.Docs/Program.cs @@ -18,6 +18,6 @@ x.SubscriptionProtocol = SubscriptionProtocol.ServerSentEvents; }) .WithHttpClient( - httpClient => { httpClient.BaseAddress = new Uri("https://swapi-graphql.netlify.app/.netlify/functions/index"); }); + httpClient => { httpClient.BaseAddress = new Uri("https://swapi-graphql.netlify.app/graphql"); }); await builder.Build().RunAsync(); diff --git a/docs/StarWars.Client/Generated/Client/RootMethods.cs b/docs/StarWars.Client/Generated/Client/RootMethods.cs index 8b7dbdb0..be6804e2 100644 --- a/docs/StarWars.Client/Generated/Client/RootMethods.cs +++ b/docs/StarWars.Client/Generated/Client/RootMethods.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/docs/StarWars.Client/Generated/Client/StarWarsClient.cs b/docs/StarWars.Client/Generated/Client/StarWarsClient.cs index 89a8cb45..b1d3e0b9 100644 --- a/docs/StarWars.Client/Generated/Client/StarWarsClient.cs +++ b/docs/StarWars.Client/Generated/Client/StarWarsClient.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 StarWars.Client; public class StarWarsClient { - public StarWarsClient(HttpClient httpClient, IOptions options, IServiceProvider provider) + public StarWarsClient(HttpClient httpClient, [FromKeyedServices("StarWarsClient")]IOptions options, IServiceProvider provider) { var client = new GraphClient(httpClient, options, provider); Query = new RootMethods(client); diff --git a/docs/StarWars.Client/Generated/Client/StarWarsClientExtensions.cs b/docs/StarWars.Client/Generated/Client/StarWarsClientExtensions.cs index 38d9fe59..7ef4634c 100644 --- a/docs/StarWars.Client/Generated/Client/StarWarsClientExtensions.cs +++ b/docs/StarWars.Client/Generated/Client/StarWarsClientExtensions.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(IServiceCo GraphClientOptions graphClientOptions) { var opts = Options.Create(graphClientOptions); - services.AddSingleton(opts); + services.AddKeyedSingleton(ClientName, opts); services.AddMemoryCache(); return new ClientBuilder(ClientName, services); } diff --git a/docs/StarWars.Client/Generated/Inputs/InputFactory.cs b/docs/StarWars.Client/Generated/Inputs/InputFactory.cs index 37de7258..1a55011e 100644 --- a/docs/StarWars.Client/Generated/Inputs/InputFactory.cs +++ b/docs/StarWars.Client/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/docs/StarWars.Client/Generated/Interfaces/Node.cs b/docs/StarWars.Client/Generated/Interfaces/Node.cs index 88df36d6..e74cf9c7 100644 --- a/docs/StarWars.Client/Generated/Interfaces/Node.cs +++ b/docs/StarWars.Client/Generated/Interfaces/Node.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; @@ -93,19 +100,19 @@ internal class NodeConverter : InterfaceJsonConverter [JsonConverter(typeof(NodeConverter))] public interface Node { - [JsonPropertyName("id")] + [GraphQLMember("id")] public string Id { get; set; } - [JsonPropertyName("__typename")] + [GraphQLMember("__typename")] public string __TypeName { get; set; } } internal class Node__Concrete : Node { - [JsonPropertyName("id")] + [GraphQLMember("id")] public string Id { get; set; } - [JsonPropertyName("__typename")] + [GraphQLMember("__typename")] public string __TypeName { get; set; } } \ No newline at end of file diff --git a/docs/StarWars.Client/Generated/Types/Film.cs b/docs/StarWars.Client/Generated/Types/Film.cs index 71e726f6..45e0c3a0 100644 --- a/docs/StarWars.Client/Generated/Types/Film.cs +++ b/docs/StarWars.Client/Generated/Types/Film.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; @@ -6,132 +13,140 @@ namespace StarWars.Client; + public static class FilmExtensions { - [GraphMethod("speciesConnection")] - public static FilmSpeciesConnection SpeciesConnection(this Film film, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("speciesConnection")] + public static FilmSpeciesConnection SpeciesConnection(this Film film, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return film.GetMethodValue("speciesConnection", after, first, before, last); + return film.GetMethodValue("speciesConnection", after, first, before, last); } - [GraphMethod("starshipConnection")] - public static FilmStarshipsConnection StarshipConnection(this Film film, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("starshipConnection")] + public static FilmStarshipsConnection StarshipConnection(this Film film, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return film.GetMethodValue("starshipConnection", after, first, before, last); + return film.GetMethodValue("starshipConnection", after, first, before, last); } - [GraphMethod("vehicleConnection")] - public static FilmVehiclesConnection VehicleConnection(this Film film, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("vehicleConnection")] + public static FilmVehiclesConnection VehicleConnection(this Film film, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return film.GetMethodValue("vehicleConnection", after, first, before, last); + return film.GetMethodValue("vehicleConnection", after, first, before, last); } - [GraphMethod("characterConnection")] - public static FilmCharactersConnection CharacterConnection(this Film film, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("characterConnection")] + public static FilmCharactersConnection CharacterConnection(this Film film, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return film.GetMethodValue("characterConnection", after, first, before, last); + return film.GetMethodValue("characterConnection", after, first, before, last); } - [GraphMethod("planetConnection")] - public static FilmPlanetsConnection PlanetConnection(this Film film, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("planetConnection")] + public static FilmPlanetsConnection PlanetConnection(this Film film, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return film.GetMethodValue("planetConnection", after, first, before, last); + return film.GetMethodValue("planetConnection", after, first, before, last); } } +/// +/// A single film. +/// public partial class Film : GraphQLTypeBase, Node { + /// + /// The title of this film. + /// + [GraphQLMember("title")] [JsonPropertyName("title")] - public string Title { get; set; } - + public string Title { get; set; } + /// + /// The episode number of this film. + /// + [GraphQLMember("episodeID")] [JsonPropertyName("episodeID")] - public int? EpisodeID { get; set; } - + public int? EpisodeID { get; set; } + /// + /// The opening paragraphs at the beginning of this film. + /// + [GraphQLMember("openingCrawl")] [JsonPropertyName("openingCrawl")] - public string OpeningCrawl { get; set; } - + public string OpeningCrawl { get; set; } + /// + /// The name of the director of this film. + /// + [GraphQLMember("director")] [JsonPropertyName("director")] - public string Director { get; set; } - + public string Director { get; set; } + /// + /// The name(s) of the producer(s) of this film. + /// + [GraphQLMember("producers")] [JsonPropertyName("producers")] - public List Producers { get; set; } - + public List Producers { get; set; } + /// + /// The ISO 8601 date format of film release at original creator country. + /// + [GraphQLMember("releaseDate")] [JsonPropertyName("releaseDate")] - public string ReleaseDate { get; set; } - - + public string ReleaseDate { get; set; } private LazyProperty _speciesConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public FilmSpeciesConnection SpeciesConnection => _speciesConnection.Value(() => GetFirstMethodValue("speciesConnection")); - // public FilmSpeciesConnection SpeciesConnection { get; set; } - - private LazyProperty _starshipConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public FilmStarshipsConnection StarshipConnection => _starshipConnection.Value(() => GetFirstMethodValue("starshipConnection")); - // public FilmStarshipsConnection StarshipConnection { get; set; } - - private LazyProperty _vehicleConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public FilmVehiclesConnection VehicleConnection => _vehicleConnection.Value(() => GetFirstMethodValue("vehicleConnection")); - // public FilmVehiclesConnection VehicleConnection { get; set; } - - private LazyProperty _characterConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public FilmCharactersConnection CharacterConnection => _characterConnection.Value(() => GetFirstMethodValue("characterConnection")); - // public FilmCharactersConnection CharacterConnection { get; set; } - - private LazyProperty _planetConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public FilmPlanetsConnection PlanetConnection => _planetConnection.Value(() => GetFirstMethodValue("planetConnection")); - // public FilmPlanetsConnection PlanetConnection { get; set; } - + /// + /// The ISO 8601 date format of the time that this resource was created. + /// + [GraphQLMember("created")] [JsonPropertyName("created")] - public string Created { get; set; } - + public string Created { get; set; } + /// + /// The ISO 8601 date format of the time that this resource was edited. + /// + [GraphQLMember("edited")] [JsonPropertyName("edited")] - public string Edited { get; set; } - + public string Edited { get; set; } + /// + /// The ID of an object + /// + [GraphQLMember("id")] [JsonPropertyName("id")] - public string Id { get; set; } - - - - - + public string Id { get; set; } + [GraphQLMember("__typename")] [JsonPropertyName("__typename")] public string __TypeName { get; set; } - } +} diff --git a/docs/StarWars.Client/Generated/Types/FilmCharactersConnection.cs b/docs/StarWars.Client/Generated/Types/FilmCharactersConnection.cs index 5e6f13be..aabee0d0 100644 --- a/docs/StarWars.Client/Generated/Types/FilmCharactersConnection.cs +++ b/docs/StarWars.Client/Generated/Types/FilmCharactersConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class FilmCharactersConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("characters")] [JsonPropertyName("characters")] - public List Characters { get; set; } - - - - - + public List Characters { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmCharactersEdge.cs b/docs/StarWars.Client/Generated/Types/FilmCharactersEdge.cs index 03a2b45f..60acb3da 100644 --- a/docs/StarWars.Client/Generated/Types/FilmCharactersEdge.cs +++ b/docs/StarWars.Client/Generated/Types/FilmCharactersEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class FilmCharactersEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Person Node { get; set; } - + public Person Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmPlanetsConnection.cs b/docs/StarWars.Client/Generated/Types/FilmPlanetsConnection.cs index 7d4d5b89..eb2ac52d 100644 --- a/docs/StarWars.Client/Generated/Types/FilmPlanetsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/FilmPlanetsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class FilmPlanetsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("planets")] [JsonPropertyName("planets")] - public List Planets { get; set; } - - - - - + public List Planets { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmPlanetsEdge.cs b/docs/StarWars.Client/Generated/Types/FilmPlanetsEdge.cs index dfd7f0f5..be94b638 100644 --- a/docs/StarWars.Client/Generated/Types/FilmPlanetsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/FilmPlanetsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class FilmPlanetsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Planet Node { get; set; } - + public Planet Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmSpeciesConnection.cs b/docs/StarWars.Client/Generated/Types/FilmSpeciesConnection.cs index ae9099e8..fdca8204 100644 --- a/docs/StarWars.Client/Generated/Types/FilmSpeciesConnection.cs +++ b/docs/StarWars.Client/Generated/Types/FilmSpeciesConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class FilmSpeciesConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("species")] [JsonPropertyName("species")] - public List Species { get; set; } - - - - - + public List Species { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmSpeciesEdge.cs b/docs/StarWars.Client/Generated/Types/FilmSpeciesEdge.cs index 631923d3..e2c29e70 100644 --- a/docs/StarWars.Client/Generated/Types/FilmSpeciesEdge.cs +++ b/docs/StarWars.Client/Generated/Types/FilmSpeciesEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class FilmSpeciesEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Species Node { get; set; } - + public Species Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmStarshipsConnection.cs b/docs/StarWars.Client/Generated/Types/FilmStarshipsConnection.cs index 20d68d22..0f8f72e8 100644 --- a/docs/StarWars.Client/Generated/Types/FilmStarshipsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/FilmStarshipsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class FilmStarshipsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("starships")] [JsonPropertyName("starships")] - public List Starships { get; set; } - - - - - + public List Starships { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmStarshipsEdge.cs b/docs/StarWars.Client/Generated/Types/FilmStarshipsEdge.cs index 31b48277..ce93a212 100644 --- a/docs/StarWars.Client/Generated/Types/FilmStarshipsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/FilmStarshipsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class FilmStarshipsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Starship Node { get; set; } - + public Starship Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmVehiclesConnection.cs b/docs/StarWars.Client/Generated/Types/FilmVehiclesConnection.cs index 507ae927..4a4bce8d 100644 --- a/docs/StarWars.Client/Generated/Types/FilmVehiclesConnection.cs +++ b/docs/StarWars.Client/Generated/Types/FilmVehiclesConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class FilmVehiclesConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("vehicles")] [JsonPropertyName("vehicles")] - public List Vehicles { get; set; } - - - - - + public List Vehicles { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmVehiclesEdge.cs b/docs/StarWars.Client/Generated/Types/FilmVehiclesEdge.cs index 4441f032..99825fab 100644 --- a/docs/StarWars.Client/Generated/Types/FilmVehiclesEdge.cs +++ b/docs/StarWars.Client/Generated/Types/FilmVehiclesEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class FilmVehiclesEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Vehicle Node { get; set; } - + public Vehicle Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmsConnection.cs b/docs/StarWars.Client/Generated/Types/FilmsConnection.cs index 3d2e9900..ff49d77d 100644 --- a/docs/StarWars.Client/Generated/Types/FilmsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/FilmsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class FilmsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("films")] [JsonPropertyName("films")] - public List Films { get; set; } - - - - - + public List Films { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/FilmsEdge.cs b/docs/StarWars.Client/Generated/Types/FilmsEdge.cs index 0b0ca9cd..f9048056 100644 --- a/docs/StarWars.Client/Generated/Types/FilmsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/FilmsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class FilmsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Film Node { get; set; } - + public Film Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PeopleConnection.cs b/docs/StarWars.Client/Generated/Types/PeopleConnection.cs index 369a5ac9..66b53387 100644 --- a/docs/StarWars.Client/Generated/Types/PeopleConnection.cs +++ b/docs/StarWars.Client/Generated/Types/PeopleConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class PeopleConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("people")] [JsonPropertyName("people")] - public List People { get; set; } - - - - - + public List People { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PeopleEdge.cs b/docs/StarWars.Client/Generated/Types/PeopleEdge.cs index 6f64043f..869c0523 100644 --- a/docs/StarWars.Client/Generated/Types/PeopleEdge.cs +++ b/docs/StarWars.Client/Generated/Types/PeopleEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class PeopleEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Person Node { get; set; } - + public Person Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/Person.cs b/docs/StarWars.Client/Generated/Types/Person.cs index f9555862..ee7ded69 100644 --- a/docs/StarWars.Client/Generated/Types/Person.cs +++ b/docs/StarWars.Client/Generated/Types/Person.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; @@ -6,116 +13,149 @@ namespace StarWars.Client; + public static class PersonExtensions { - [GraphMethod("filmConnection")] - public static PersonFilmsConnection FilmConnection(this Person person, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("filmConnection")] + public static PersonFilmsConnection FilmConnection(this Person person, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return person.GetMethodValue("filmConnection", after, first, before, last); + return person.GetMethodValue("filmConnection", after, first, before, last); } - [GraphMethod("starshipConnection")] - public static PersonStarshipsConnection StarshipConnection(this Person person, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("starshipConnection")] + public static PersonStarshipsConnection StarshipConnection(this Person person, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return person.GetMethodValue("starshipConnection", after, first, before, last); + return person.GetMethodValue("starshipConnection", after, first, before, last); } - [GraphMethod("vehicleConnection")] - public static PersonVehiclesConnection VehicleConnection(this Person person, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("vehicleConnection")] + public static PersonVehiclesConnection VehicleConnection(this Person person, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return person.GetMethodValue("vehicleConnection", after, first, before, last); + return person.GetMethodValue("vehicleConnection", after, first, before, last); } } +/// +/// An individual person or character within the Star Wars universe. +/// public partial class Person : GraphQLTypeBase, Node { + /// + /// The name of this person. + /// + [GraphQLMember("name")] [JsonPropertyName("name")] - public string Name { get; set; } - + public string Name { get; set; } + /// + /// The birth year of the person, using the in-universe standard of BBY or ABY - +/// Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is +/// a battle that occurs at the end of Star Wars episode IV: A New Hope. + /// + [GraphQLMember("birthYear")] [JsonPropertyName("birthYear")] - public string BirthYear { get; set; } - + public string BirthYear { get; set; } + /// + /// The eye color of this person. Will be "unknown" if not known or "n/a" if the +/// person does not have an eye. + /// + [GraphQLMember("eyeColor")] [JsonPropertyName("eyeColor")] - public string EyeColor { get; set; } - + public string EyeColor { get; set; } + /// + /// The gender of this person. Either "Male", "Female" or "unknown", +/// "n/a" if the person does not have a gender. + /// + [GraphQLMember("gender")] [JsonPropertyName("gender")] - public string Gender { get; set; } - + public string Gender { get; set; } + /// + /// The hair color of this person. Will be "unknown" if not known or "n/a" if the +/// person does not have hair. + /// + [GraphQLMember("hairColor")] [JsonPropertyName("hairColor")] - public string HairColor { get; set; } - + public string HairColor { get; set; } + /// + /// The height of the person in centimeters. + /// + [GraphQLMember("height")] [JsonPropertyName("height")] - public int? Height { get; set; } - + public int? Height { get; set; } + /// + /// The mass of the person in kilograms. + /// + [GraphQLMember("mass")] [JsonPropertyName("mass")] - public float? Mass { get; set; } - + public double? Mass { get; set; } + /// + /// The skin color of this person. + /// + [GraphQLMember("skinColor")] [JsonPropertyName("skinColor")] - public string SkinColor { get; set; } - + public string SkinColor { get; set; } + /// + /// A planet that this person was born on or inhabits. + /// + [GraphQLMember("homeworld")] [JsonPropertyName("homeworld")] - public Planet Homeworld { get; set; } - - + public Planet Homeworld { get; set; } private LazyProperty _filmConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public PersonFilmsConnection FilmConnection => _filmConnection.Value(() => GetFirstMethodValue("filmConnection")); - // public PersonFilmsConnection FilmConnection { get; set; } - + /// + /// The species that this person belongs to, or null if unknown. + /// + [GraphQLMember("species")] [JsonPropertyName("species")] - public Species Species { get; set; } - - + public Species Species { get; set; } private LazyProperty _starshipConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public PersonStarshipsConnection StarshipConnection => _starshipConnection.Value(() => GetFirstMethodValue("starshipConnection")); - // public PersonStarshipsConnection StarshipConnection { get; set; } - - private LazyProperty _vehicleConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public PersonVehiclesConnection VehicleConnection => _vehicleConnection.Value(() => GetFirstMethodValue("vehicleConnection")); - // public PersonVehiclesConnection VehicleConnection { get; set; } - + /// + /// The ISO 8601 date format of the time that this resource was created. + /// + [GraphQLMember("created")] [JsonPropertyName("created")] - public string Created { get; set; } - + public string Created { get; set; } + /// + /// The ISO 8601 date format of the time that this resource was edited. + /// + [GraphQLMember("edited")] [JsonPropertyName("edited")] - public string Edited { get; set; } - + public string Edited { get; set; } + /// + /// The ID of an object + /// + [GraphQLMember("id")] [JsonPropertyName("id")] - public string Id { get; set; } - - - - - + public string Id { get; set; } + [GraphQLMember("__typename")] [JsonPropertyName("__typename")] public string __TypeName { get; set; } - } +} diff --git a/docs/StarWars.Client/Generated/Types/PersonFilmsConnection.cs b/docs/StarWars.Client/Generated/Types/PersonFilmsConnection.cs index a7721b74..e8385170 100644 --- a/docs/StarWars.Client/Generated/Types/PersonFilmsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/PersonFilmsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class PersonFilmsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("films")] [JsonPropertyName("films")] - public List Films { get; set; } - - - - - + public List Films { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PersonFilmsEdge.cs b/docs/StarWars.Client/Generated/Types/PersonFilmsEdge.cs index d1080691..79479a4b 100644 --- a/docs/StarWars.Client/Generated/Types/PersonFilmsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/PersonFilmsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class PersonFilmsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Film Node { get; set; } - + public Film Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PersonStarshipsConnection.cs b/docs/StarWars.Client/Generated/Types/PersonStarshipsConnection.cs index d5fcd4c7..c9f97dc2 100644 --- a/docs/StarWars.Client/Generated/Types/PersonStarshipsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/PersonStarshipsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class PersonStarshipsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("starships")] [JsonPropertyName("starships")] - public List Starships { get; set; } - - - - - + public List Starships { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PersonStarshipsEdge.cs b/docs/StarWars.Client/Generated/Types/PersonStarshipsEdge.cs index 2f01f336..3d0053a2 100644 --- a/docs/StarWars.Client/Generated/Types/PersonStarshipsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/PersonStarshipsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class PersonStarshipsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Starship Node { get; set; } - + public Starship Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PersonVehiclesConnection.cs b/docs/StarWars.Client/Generated/Types/PersonVehiclesConnection.cs index aeb2cb3a..71d71c3f 100644 --- a/docs/StarWars.Client/Generated/Types/PersonVehiclesConnection.cs +++ b/docs/StarWars.Client/Generated/Types/PersonVehiclesConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class PersonVehiclesConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("vehicles")] [JsonPropertyName("vehicles")] - public List Vehicles { get; set; } - - - - - + public List Vehicles { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PersonVehiclesEdge.cs b/docs/StarWars.Client/Generated/Types/PersonVehiclesEdge.cs index 51e309d6..17da0668 100644 --- a/docs/StarWars.Client/Generated/Types/PersonVehiclesEdge.cs +++ b/docs/StarWars.Client/Generated/Types/PersonVehiclesEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class PersonVehiclesEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Vehicle Node { get; set; } - + public Vehicle Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/Planet.cs b/docs/StarWars.Client/Generated/Types/Planet.cs index 727e5e7c..ed5c2784 100644 --- a/docs/StarWars.Client/Generated/Types/Planet.cs +++ b/docs/StarWars.Client/Generated/Types/Planet.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; @@ -6,96 +13,130 @@ namespace StarWars.Client; + public static class PlanetExtensions { - [GraphMethod("residentConnection")] - public static PlanetResidentsConnection ResidentConnection(this Planet planet, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("residentConnection")] + public static PlanetResidentsConnection ResidentConnection(this Planet planet, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return planet.GetMethodValue("residentConnection", after, first, before, last); + return planet.GetMethodValue("residentConnection", after, first, before, last); } - [GraphMethod("filmConnection")] - public static PlanetFilmsConnection FilmConnection(this Planet planet, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("filmConnection")] + public static PlanetFilmsConnection FilmConnection(this Planet planet, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return planet.GetMethodValue("filmConnection", after, first, before, last); + return planet.GetMethodValue("filmConnection", after, first, before, last); } } +/// +/// A large mass, planet or planetoid in the Star Wars Universe, at the time of +/// 0 ABY. +/// public partial class Planet : GraphQLTypeBase, Node { + /// + /// The name of this planet. + /// + [GraphQLMember("name")] [JsonPropertyName("name")] - public string Name { get; set; } - + public string Name { get; set; } + /// + /// The diameter of this planet in kilometers. + /// + [GraphQLMember("diameter")] [JsonPropertyName("diameter")] - public int? Diameter { get; set; } - + public int? Diameter { get; set; } + /// + /// The number of standard hours it takes for this planet to complete a single +/// rotation on its axis. + /// + [GraphQLMember("rotationPeriod")] [JsonPropertyName("rotationPeriod")] - public int? RotationPeriod { get; set; } - + public int? RotationPeriod { get; set; } + /// + /// The number of standard days it takes for this planet to complete a single orbit +/// of its local star. + /// + [GraphQLMember("orbitalPeriod")] [JsonPropertyName("orbitalPeriod")] - public int? OrbitalPeriod { get; set; } - + public int? OrbitalPeriod { get; set; } + /// + /// A number denoting the gravity of this planet, where "1" is normal or 1 standard +/// G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. + /// + [GraphQLMember("gravity")] [JsonPropertyName("gravity")] - public string Gravity { get; set; } - + public string Gravity { get; set; } + /// + /// The average population of sentient beings inhabiting this planet. + /// + [GraphQLMember("population")] [JsonPropertyName("population")] - public float? Population { get; set; } - + public double? Population { get; set; } + /// + /// The climates of this planet. + /// + [GraphQLMember("climates")] [JsonPropertyName("climates")] - public List Climates { get; set; } - + public List Climates { get; set; } + /// + /// The terrains of this planet. + /// + [GraphQLMember("terrains")] [JsonPropertyName("terrains")] - public List Terrains { get; set; } - + public List Terrains { get; set; } + /// + /// The percentage of the planet surface that is naturally occurring water or bodies +/// of water. + /// + [GraphQLMember("surfaceWater")] [JsonPropertyName("surfaceWater")] - public float? SurfaceWater { get; set; } - - + public double? SurfaceWater { get; set; } private LazyProperty _residentConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public PlanetResidentsConnection ResidentConnection => _residentConnection.Value(() => GetFirstMethodValue("residentConnection")); - // public PlanetResidentsConnection ResidentConnection { get; set; } - - private LazyProperty _filmConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public PlanetFilmsConnection FilmConnection => _filmConnection.Value(() => GetFirstMethodValue("filmConnection")); - // public PlanetFilmsConnection FilmConnection { get; set; } - + /// + /// The ISO 8601 date format of the time that this resource was created. + /// + [GraphQLMember("created")] [JsonPropertyName("created")] - public string Created { get; set; } - + public string Created { get; set; } + /// + /// The ISO 8601 date format of the time that this resource was edited. + /// + [GraphQLMember("edited")] [JsonPropertyName("edited")] - public string Edited { get; set; } - + public string Edited { get; set; } + /// + /// The ID of an object + /// + [GraphQLMember("id")] [JsonPropertyName("id")] - public string Id { get; set; } - - - - - + public string Id { get; set; } + [GraphQLMember("__typename")] [JsonPropertyName("__typename")] public string __TypeName { get; set; } - } +} diff --git a/docs/StarWars.Client/Generated/Types/PlanetFilmsConnection.cs b/docs/StarWars.Client/Generated/Types/PlanetFilmsConnection.cs index 291eacf4..7581a297 100644 --- a/docs/StarWars.Client/Generated/Types/PlanetFilmsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/PlanetFilmsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class PlanetFilmsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("films")] [JsonPropertyName("films")] - public List Films { get; set; } - - - - - + public List Films { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PlanetFilmsEdge.cs b/docs/StarWars.Client/Generated/Types/PlanetFilmsEdge.cs index 6c2838fb..e8d3b7d2 100644 --- a/docs/StarWars.Client/Generated/Types/PlanetFilmsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/PlanetFilmsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class PlanetFilmsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Film Node { get; set; } - + public Film Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PlanetResidentsConnection.cs b/docs/StarWars.Client/Generated/Types/PlanetResidentsConnection.cs index 02ed1afc..99762c7d 100644 --- a/docs/StarWars.Client/Generated/Types/PlanetResidentsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/PlanetResidentsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class PlanetResidentsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("residents")] [JsonPropertyName("residents")] - public List Residents { get; set; } - - - - - + public List Residents { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PlanetResidentsEdge.cs b/docs/StarWars.Client/Generated/Types/PlanetResidentsEdge.cs index dacf95a4..c27fb16a 100644 --- a/docs/StarWars.Client/Generated/Types/PlanetResidentsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/PlanetResidentsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class PlanetResidentsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Person Node { get; set; } - + public Person Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PlanetsConnection.cs b/docs/StarWars.Client/Generated/Types/PlanetsConnection.cs index 6bbf378f..c7a00fa8 100644 --- a/docs/StarWars.Client/Generated/Types/PlanetsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/PlanetsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class PlanetsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("planets")] [JsonPropertyName("planets")] - public List Planets { get; set; } - - - - - + public List Planets { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/PlanetsEdge.cs b/docs/StarWars.Client/Generated/Types/PlanetsEdge.cs index 04cf4217..6047a95b 100644 --- a/docs/StarWars.Client/Generated/Types/PlanetsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/PlanetsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class PlanetsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Planet Node { get; set; } - + public Planet Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/Species.cs b/docs/StarWars.Client/Generated/Types/Species.cs index 4ddb6f29..d1e7c0c3 100644 --- a/docs/StarWars.Client/Generated/Types/Species.cs +++ b/docs/StarWars.Client/Generated/Types/Species.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; @@ -6,100 +13,135 @@ namespace StarWars.Client; + public static class SpeciesExtensions { - [GraphMethod("personConnection")] - public static SpeciesPeopleConnection PersonConnection(this Species species, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("personConnection")] + public static SpeciesPeopleConnection PersonConnection(this Species species, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return species.GetMethodValue("personConnection", after, first, before, last); + return species.GetMethodValue("personConnection", after, first, before, last); } - [GraphMethod("filmConnection")] - public static SpeciesFilmsConnection FilmConnection(this Species species, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("filmConnection")] + public static SpeciesFilmsConnection FilmConnection(this Species species, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return species.GetMethodValue("filmConnection", after, first, before, last); + return species.GetMethodValue("filmConnection", after, first, before, last); } } +/// +/// A type of person or character within the Star Wars Universe. +/// public partial class Species : GraphQLTypeBase, Node { + /// + /// The name of this species. + /// + [GraphQLMember("name")] [JsonPropertyName("name")] - public string Name { get; set; } - + public string Name { get; set; } + /// + /// The classification of this species, such as "mammal" or "reptile". + /// + [GraphQLMember("classification")] [JsonPropertyName("classification")] - public string Classification { get; set; } - + public string Classification { get; set; } + /// + /// The designation of this species, such as "sentient". + /// + [GraphQLMember("designation")] [JsonPropertyName("designation")] - public string Designation { get; set; } - + public string Designation { get; set; } + /// + /// The average height of this species in centimeters. + /// + [GraphQLMember("averageHeight")] [JsonPropertyName("averageHeight")] - public float? AverageHeight { get; set; } - + public double? AverageHeight { get; set; } + /// + /// The average lifespan of this species in years, null if unknown. + /// + [GraphQLMember("averageLifespan")] [JsonPropertyName("averageLifespan")] - public int? AverageLifespan { get; set; } - + public int? AverageLifespan { get; set; } + /// + /// Common eye colors for this species, null if this species does not typically +/// have eyes. + /// + [GraphQLMember("eyeColors")] [JsonPropertyName("eyeColors")] - public List EyeColors { get; set; } - + public List EyeColors { get; set; } + /// + /// Common hair colors for this species, null if this species does not typically +/// have hair. + /// + [GraphQLMember("hairColors")] [JsonPropertyName("hairColors")] - public List HairColors { get; set; } - + public List HairColors { get; set; } + /// + /// Common skin colors for this species, null if this species does not typically +/// have skin. + /// + [GraphQLMember("skinColors")] [JsonPropertyName("skinColors")] - public List SkinColors { get; set; } - + public List SkinColors { get; set; } + /// + /// The language commonly spoken by this species. + /// + [GraphQLMember("language")] [JsonPropertyName("language")] - public string Language { get; set; } - + public string Language { get; set; } + /// + /// A planet that this species originates from. + /// + [GraphQLMember("homeworld")] [JsonPropertyName("homeworld")] - public Planet Homeworld { get; set; } - - + public Planet Homeworld { get; set; } private LazyProperty _personConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public SpeciesPeopleConnection PersonConnection => _personConnection.Value(() => GetFirstMethodValue("personConnection")); - // public SpeciesPeopleConnection PersonConnection { get; set; } - - private LazyProperty _filmConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public SpeciesFilmsConnection FilmConnection => _filmConnection.Value(() => GetFirstMethodValue("filmConnection")); - // public SpeciesFilmsConnection FilmConnection { get; set; } - + /// + /// The ISO 8601 date format of the time that this resource was created. + /// + [GraphQLMember("created")] [JsonPropertyName("created")] - public string Created { get; set; } - + public string Created { get; set; } + /// + /// The ISO 8601 date format of the time that this resource was edited. + /// + [GraphQLMember("edited")] [JsonPropertyName("edited")] - public string Edited { get; set; } - + public string Edited { get; set; } + /// + /// The ID of an object + /// + [GraphQLMember("id")] [JsonPropertyName("id")] - public string Id { get; set; } - - - - - + public string Id { get; set; } + [GraphQLMember("__typename")] [JsonPropertyName("__typename")] public string __TypeName { get; set; } - } +} diff --git a/docs/StarWars.Client/Generated/Types/SpeciesConnection.cs b/docs/StarWars.Client/Generated/Types/SpeciesConnection.cs index ec6d8cdd..acbaa03e 100644 --- a/docs/StarWars.Client/Generated/Types/SpeciesConnection.cs +++ b/docs/StarWars.Client/Generated/Types/SpeciesConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class SpeciesConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("species")] [JsonPropertyName("species")] - public List Species { get; set; } - - - - - + public List Species { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/SpeciesEdge.cs b/docs/StarWars.Client/Generated/Types/SpeciesEdge.cs index fec30e67..da09d3bd 100644 --- a/docs/StarWars.Client/Generated/Types/SpeciesEdge.cs +++ b/docs/StarWars.Client/Generated/Types/SpeciesEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class SpeciesEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Species Node { get; set; } - + public Species Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/SpeciesFilmsConnection.cs b/docs/StarWars.Client/Generated/Types/SpeciesFilmsConnection.cs index 61c8fdf3..c476a820 100644 --- a/docs/StarWars.Client/Generated/Types/SpeciesFilmsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/SpeciesFilmsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class SpeciesFilmsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("films")] [JsonPropertyName("films")] - public List Films { get; set; } - - - - - + public List Films { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/SpeciesFilmsEdge.cs b/docs/StarWars.Client/Generated/Types/SpeciesFilmsEdge.cs index 9e513753..5de8d4cc 100644 --- a/docs/StarWars.Client/Generated/Types/SpeciesFilmsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/SpeciesFilmsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class SpeciesFilmsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Film Node { get; set; } - + public Film Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/SpeciesPeopleConnection.cs b/docs/StarWars.Client/Generated/Types/SpeciesPeopleConnection.cs index 891be862..f9204b1a 100644 --- a/docs/StarWars.Client/Generated/Types/SpeciesPeopleConnection.cs +++ b/docs/StarWars.Client/Generated/Types/SpeciesPeopleConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class SpeciesPeopleConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("people")] [JsonPropertyName("people")] - public List People { get; set; } - - - - - + public List People { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/SpeciesPeopleEdge.cs b/docs/StarWars.Client/Generated/Types/SpeciesPeopleEdge.cs index 71347705..76635f86 100644 --- a/docs/StarWars.Client/Generated/Types/SpeciesPeopleEdge.cs +++ b/docs/StarWars.Client/Generated/Types/SpeciesPeopleEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class SpeciesPeopleEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Person Node { get; set; } - + public Person Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/Starship.cs b/docs/StarWars.Client/Generated/Types/Starship.cs index 39892ea8..c42e82fc 100644 --- a/docs/StarWars.Client/Generated/Types/Starship.cs +++ b/docs/StarWars.Client/Generated/Types/Starship.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; @@ -6,112 +13,161 @@ namespace StarWars.Client; + public static class StarshipExtensions { - [GraphMethod("pilotConnection")] - public static StarshipPilotsConnection PilotConnection(this Starship starship, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("pilotConnection")] + public static StarshipPilotsConnection PilotConnection(this Starship starship, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return starship.GetMethodValue("pilotConnection", after, first, before, last); + return starship.GetMethodValue("pilotConnection", after, first, before, last); } - [GraphMethod("filmConnection")] - public static StarshipFilmsConnection FilmConnection(this Starship starship, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("filmConnection")] + public static StarshipFilmsConnection FilmConnection(this Starship starship, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return starship.GetMethodValue("filmConnection", after, first, before, last); + return starship.GetMethodValue("filmConnection", after, first, before, last); } } +/// +/// A single transport craft that has hyperdrive capability. +/// public partial class Starship : GraphQLTypeBase, Node { + /// + /// The name of this starship. The common name, such as "Death Star". + /// + [GraphQLMember("name")] [JsonPropertyName("name")] - public string Name { get; set; } - + public string Name { get; set; } + /// + /// The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 +/// Orbital Battle Station". + /// + [GraphQLMember("model")] [JsonPropertyName("model")] - public string Model { get; set; } - + public string Model { get; set; } + /// + /// The class of this starship, such as "Starfighter" or "Deep Space Mobile +/// Battlestation" + /// + [GraphQLMember("starshipClass")] [JsonPropertyName("starshipClass")] - public string StarshipClass { get; set; } - + public string StarshipClass { get; set; } + /// + /// The manufacturers of this starship. + /// + [GraphQLMember("manufacturers")] [JsonPropertyName("manufacturers")] - public List Manufacturers { get; set; } - + public List Manufacturers { get; set; } + /// + /// The cost of this starship new, in galactic credits. + /// + [GraphQLMember("costInCredits")] [JsonPropertyName("costInCredits")] - public float? CostInCredits { get; set; } - + public double? CostInCredits { get; set; } + /// + /// The length of this starship in meters. + /// + [GraphQLMember("length")] [JsonPropertyName("length")] - public float? Length { get; set; } - + public double? Length { get; set; } + /// + /// The number of personnel needed to run or pilot this starship. + /// + [GraphQLMember("crew")] [JsonPropertyName("crew")] - public string Crew { get; set; } - + public string Crew { get; set; } + /// + /// The number of non-essential people this starship can transport. + /// + [GraphQLMember("passengers")] [JsonPropertyName("passengers")] - public string Passengers { get; set; } - + public string Passengers { get; set; } + /// + /// The maximum speed of this starship in atmosphere. null if this starship is +/// incapable of atmosphering flight. + /// + [GraphQLMember("maxAtmospheringSpeed")] [JsonPropertyName("maxAtmospheringSpeed")] - public int? MaxAtmospheringSpeed { get; set; } - + public int? MaxAtmospheringSpeed { get; set; } + /// + /// The class of this starships hyperdrive. + /// + [GraphQLMember("hyperdriveRating")] [JsonPropertyName("hyperdriveRating")] - public float? HyperdriveRating { get; set; } - + public double? HyperdriveRating { get; set; } + /// + /// The Maximum number of Megalights this starship can travel in a standard hour. +/// A "Megalight" is a standard unit of distance and has never been defined before +/// within the Star Wars universe. This figure is only really useful for measuring +/// the difference in speed of starships. We can assume it is similar to AU, the +/// distance between our Sun (Sol) and Earth. + /// + [GraphQLMember("MGLT")] [JsonPropertyName("MGLT")] - public int? MGLT { get; set; } - + public int? MGLT { get; set; } + /// + /// The maximum number of kilograms that this starship can transport. + /// + [GraphQLMember("cargoCapacity")] [JsonPropertyName("cargoCapacity")] - public float? CargoCapacity { get; set; } - + public double? CargoCapacity { get; set; } + /// + /// The maximum length of time that this starship can provide consumables for its +/// entire crew without having to resupply. + /// + [GraphQLMember("consumables")] [JsonPropertyName("consumables")] - public string Consumables { get; set; } - - + public string Consumables { get; set; } private LazyProperty _pilotConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public StarshipPilotsConnection PilotConnection => _pilotConnection.Value(() => GetFirstMethodValue("pilotConnection")); - // public StarshipPilotsConnection PilotConnection { get; set; } - - private LazyProperty _filmConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public StarshipFilmsConnection FilmConnection => _filmConnection.Value(() => GetFirstMethodValue("filmConnection")); - // public StarshipFilmsConnection FilmConnection { get; set; } - + /// + /// The ISO 8601 date format of the time that this resource was created. + /// + [GraphQLMember("created")] [JsonPropertyName("created")] - public string Created { get; set; } - + public string Created { get; set; } + /// + /// The ISO 8601 date format of the time that this resource was edited. + /// + [GraphQLMember("edited")] [JsonPropertyName("edited")] - public string Edited { get; set; } - + public string Edited { get; set; } + /// + /// The ID of an object + /// + [GraphQLMember("id")] [JsonPropertyName("id")] - public string Id { get; set; } - - - - - + public string Id { get; set; } + [GraphQLMember("__typename")] [JsonPropertyName("__typename")] public string __TypeName { get; set; } - } +} diff --git a/docs/StarWars.Client/Generated/Types/StarshipFilmsConnection.cs b/docs/StarWars.Client/Generated/Types/StarshipFilmsConnection.cs index 8a7b3ee6..91ff6ee3 100644 --- a/docs/StarWars.Client/Generated/Types/StarshipFilmsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/StarshipFilmsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class StarshipFilmsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("films")] [JsonPropertyName("films")] - public List Films { get; set; } - - - - - + public List Films { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/StarshipFilmsEdge.cs b/docs/StarWars.Client/Generated/Types/StarshipFilmsEdge.cs index a511638b..048f9d19 100644 --- a/docs/StarWars.Client/Generated/Types/StarshipFilmsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/StarshipFilmsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class StarshipFilmsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Film Node { get; set; } - + public Film Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/StarshipPilotsConnection.cs b/docs/StarWars.Client/Generated/Types/StarshipPilotsConnection.cs index f4aad2e0..ff498d78 100644 --- a/docs/StarWars.Client/Generated/Types/StarshipPilotsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/StarshipPilotsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class StarshipPilotsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("pilots")] [JsonPropertyName("pilots")] - public List Pilots { get; set; } - - - - - + public List Pilots { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/StarshipPilotsEdge.cs b/docs/StarWars.Client/Generated/Types/StarshipPilotsEdge.cs index ecea3f9b..1786fdeb 100644 --- a/docs/StarWars.Client/Generated/Types/StarshipPilotsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/StarshipPilotsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class StarshipPilotsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Person Node { get; set; } - + public Person Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/StarshipsConnection.cs b/docs/StarWars.Client/Generated/Types/StarshipsConnection.cs index d37f4d69..99c48825 100644 --- a/docs/StarWars.Client/Generated/Types/StarshipsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/StarshipsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class StarshipsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("starships")] [JsonPropertyName("starships")] - public List Starships { get; set; } - - - - - + public List Starships { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/StarshipsEdge.cs b/docs/StarWars.Client/Generated/Types/StarshipsEdge.cs index c2f0f7b9..0086d18d 100644 --- a/docs/StarWars.Client/Generated/Types/StarshipsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/StarshipsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class StarshipsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Starship Node { get; set; } - + public Starship Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/Vehicle.cs b/docs/StarWars.Client/Generated/Types/Vehicle.cs index 45a7b395..e7134432 100644 --- a/docs/StarWars.Client/Generated/Types/Vehicle.cs +++ b/docs/StarWars.Client/Generated/Types/Vehicle.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; @@ -6,104 +13,142 @@ namespace StarWars.Client; + public static class VehicleExtensions { - [GraphMethod("pilotConnection")] - public static VehiclePilotsConnection PilotConnection(this Vehicle vehicle, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("pilotConnection")] + public static VehiclePilotsConnection PilotConnection(this Vehicle vehicle, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return vehicle.GetMethodValue("pilotConnection", after, first, before, last); + return vehicle.GetMethodValue("pilotConnection", after, first, before, last); } - [GraphMethod("filmConnection")] - public static VehicleFilmsConnection FilmConnection(this Vehicle vehicle, [GraphArgument("String")] string after = null, [GraphArgument("Int")] int? first = null, [GraphArgument("String")] string before = null, [GraphArgument("Int")] int? last = null) + [GraphQLMember("filmConnection")] + public static VehicleFilmsConnection FilmConnection(this Vehicle vehicle, [GraphQLArgument("after", "String")] string after = null, [GraphQLArgument("first", "Int")] int? first = null, [GraphQLArgument("before", "String")] string before = null, [GraphQLArgument("last", "Int")] int? last = null) { - return vehicle.GetMethodValue("filmConnection", after, first, before, last); + return vehicle.GetMethodValue("filmConnection", after, first, before, last); } } +/// +/// A single transport craft that does not have hyperdrive capability +/// public partial class Vehicle : GraphQLTypeBase, Node { + /// + /// The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder +/// bike". + /// + [GraphQLMember("name")] [JsonPropertyName("name")] - public string Name { get; set; } - + public string Name { get; set; } + /// + /// The model or official name of this vehicle. Such as "All-Terrain Attack +/// Transport". + /// + [GraphQLMember("model")] [JsonPropertyName("model")] - public string Model { get; set; } - + public string Model { get; set; } + /// + /// The class of this vehicle, such as "Wheeled" or "Repulsorcraft". + /// + [GraphQLMember("vehicleClass")] [JsonPropertyName("vehicleClass")] - public string VehicleClass { get; set; } - + public string VehicleClass { get; set; } + /// + /// The manufacturers of this vehicle. + /// + [GraphQLMember("manufacturers")] [JsonPropertyName("manufacturers")] - public List Manufacturers { get; set; } - + public List Manufacturers { get; set; } + /// + /// The cost of this vehicle new, in Galactic Credits. + /// + [GraphQLMember("costInCredits")] [JsonPropertyName("costInCredits")] - public float? CostInCredits { get; set; } - + public double? CostInCredits { get; set; } + /// + /// The length of this vehicle in meters. + /// + [GraphQLMember("length")] [JsonPropertyName("length")] - public float? Length { get; set; } - + public double? Length { get; set; } + /// + /// The number of personnel needed to run or pilot this vehicle. + /// + [GraphQLMember("crew")] [JsonPropertyName("crew")] - public string Crew { get; set; } - + public string Crew { get; set; } + /// + /// The number of non-essential people this vehicle can transport. + /// + [GraphQLMember("passengers")] [JsonPropertyName("passengers")] - public string Passengers { get; set; } - + public string Passengers { get; set; } + /// + /// The maximum speed of this vehicle in atmosphere. + /// + [GraphQLMember("maxAtmospheringSpeed")] [JsonPropertyName("maxAtmospheringSpeed")] - public int? MaxAtmospheringSpeed { get; set; } - + public int? MaxAtmospheringSpeed { get; set; } + /// + /// The maximum number of kilograms that this vehicle can transport. + /// + [GraphQLMember("cargoCapacity")] [JsonPropertyName("cargoCapacity")] - public float? CargoCapacity { get; set; } - + public double? CargoCapacity { get; set; } + /// + /// The maximum length of time that this vehicle can provide consumables for its +/// entire crew without having to resupply. + /// + [GraphQLMember("consumables")] [JsonPropertyName("consumables")] - public string Consumables { get; set; } - - + public string Consumables { get; set; } private LazyProperty _pilotConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public VehiclePilotsConnection PilotConnection => _pilotConnection.Value(() => GetFirstMethodValue("pilotConnection")); - // public VehiclePilotsConnection PilotConnection { get; set; } - - private LazyProperty _filmConnection = new(); /// /// Do not use in Query, only to retrive result /// - [GraphShadowProperty] public VehicleFilmsConnection FilmConnection => _filmConnection.Value(() => GetFirstMethodValue("filmConnection")); - // public VehicleFilmsConnection FilmConnection { get; set; } - + /// + /// The ISO 8601 date format of the time that this resource was created. + /// + [GraphQLMember("created")] [JsonPropertyName("created")] - public string Created { get; set; } - + public string Created { get; set; } + /// + /// The ISO 8601 date format of the time that this resource was edited. + /// + [GraphQLMember("edited")] [JsonPropertyName("edited")] - public string Edited { get; set; } - + public string Edited { get; set; } + /// + /// The ID of an object + /// + [GraphQLMember("id")] [JsonPropertyName("id")] - public string Id { get; set; } - - - - - + public string Id { get; set; } + [GraphQLMember("__typename")] [JsonPropertyName("__typename")] public string __TypeName { get; set; } - } +} diff --git a/docs/StarWars.Client/Generated/Types/VehicleFilmsConnection.cs b/docs/StarWars.Client/Generated/Types/VehicleFilmsConnection.cs index 4527a443..23a624d2 100644 --- a/docs/StarWars.Client/Generated/Types/VehicleFilmsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/VehicleFilmsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class VehicleFilmsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("films")] [JsonPropertyName("films")] - public List Films { get; set; } - - - - - + public List Films { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/VehicleFilmsEdge.cs b/docs/StarWars.Client/Generated/Types/VehicleFilmsEdge.cs index 1d793b16..e9527bf0 100644 --- a/docs/StarWars.Client/Generated/Types/VehicleFilmsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/VehicleFilmsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class VehicleFilmsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Film Node { get; set; } - + public Film Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/VehiclePilotsConnection.cs b/docs/StarWars.Client/Generated/Types/VehiclePilotsConnection.cs index e38578db..8ea0645f 100644 --- a/docs/StarWars.Client/Generated/Types/VehiclePilotsConnection.cs +++ b/docs/StarWars.Client/Generated/Types/VehiclePilotsConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class VehiclePilotsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("pilots")] [JsonPropertyName("pilots")] - public List Pilots { get; set; } - - - - - + public List Pilots { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/VehiclePilotsEdge.cs b/docs/StarWars.Client/Generated/Types/VehiclePilotsEdge.cs index 7dcc8f1b..0a7b5331 100644 --- a/docs/StarWars.Client/Generated/Types/VehiclePilotsEdge.cs +++ b/docs/StarWars.Client/Generated/Types/VehiclePilotsEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class VehiclePilotsEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Person Node { get; set; } - + public Person Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/VehiclesConnection.cs b/docs/StarWars.Client/Generated/Types/VehiclesConnection.cs index ccf7e55d..af00fef1 100644 --- a/docs/StarWars.Client/Generated/Types/VehiclesConnection.cs +++ b/docs/StarWars.Client/Generated/Types/VehiclesConnection.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; @@ -6,26 +13,46 @@ namespace StarWars.Client; + +/// +/// A connection to a list of items. +/// public partial class VehiclesConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging { + /// + /// Information to aid in pagination. + /// + [GraphQLMember("pageInfo")] [JsonPropertyName("pageInfo")] - public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } - + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + /// + /// A list of edges. + /// + [GraphQLMember("edges")] [JsonPropertyName("edges")] - public List Edges { get; set; } - - + public List Edges { get; set; } + + /// + /// A count of the total number of objects in this connection, ignoring pagination. +/// This allows a client to fetch the first five objects by passing "5" as the +/// argument to "first", then fetch the total count so it could display "5 of 83", +/// for example. + /// + [GraphQLMember("totalCount")] [JsonPropertyName("totalCount")] - public int? TotalCount { get; set; } - - + public int? TotalCount { get; set; } + + /// + /// A list of all of the objects returned in the connection. This is a convenience +/// field provided for quickly exploring the API; rather than querying for +/// "{ edges { node } }" when no edge data is needed, this field can be be used +/// instead. Note that when clients like Relay need to fetch the "cursor" field on +/// the edge to enable efficient pagination, this shortcut cannot be used, and the +/// full "{ edges { node } }" version should be used instead. + /// + [GraphQLMember("vehicles")] [JsonPropertyName("vehicles")] - public List Vehicles { get; set; } - - - - - + public List Vehicles { get; set; } } diff --git a/docs/StarWars.Client/Generated/Types/VehiclesEdge.cs b/docs/StarWars.Client/Generated/Types/VehiclesEdge.cs index 1e0374e1..29ee51c6 100644 --- a/docs/StarWars.Client/Generated/Types/VehiclesEdge.cs +++ b/docs/StarWars.Client/Generated/Types/VehiclesEdge.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; @@ -6,18 +13,24 @@ namespace StarWars.Client; + +/// +/// An edge in a connection. +/// public partial class VehiclesEdge : GraphQLTypeBase { + /// + /// The item at the end of the edge + /// + [GraphQLMember("node")] [JsonPropertyName("node")] - public Vehicle Node { get; set; } - + public Vehicle Node { get; set; } + /// + /// A cursor for use in pagination + /// + [GraphQLMember("cursor")] [JsonPropertyName("cursor")] - public string Cursor { get; set; } - - - - - + public string Cursor { get; set; } } diff --git a/docs/StarWars.Client/ReadMe.md b/docs/StarWars.Client/ReadMe.md new file mode 100644 index 00000000..b2cee588 --- /dev/null +++ b/docs/StarWars.Client/ReadMe.md @@ -0,0 +1,6 @@ +### Upgrade Tool + dotnet tool update Linq2GraphQL.Generator -g --prerelease + +### Update Schema + Linq2GraphQL https://swapi-graphql.netlify.app/graphql -c="StarWarsClient" -n="StarWars.Client" -o="Generated" -es="AddUnknownOption" + diff --git a/src/Linq2GraphQL.Generator/GraphQLSchema/Helpers.cs b/src/Linq2GraphQL.Generator/GraphQLSchema/Helpers.cs index 990a5896..37fb9dd4 100644 --- a/src/Linq2GraphQL.Generator/GraphQLSchema/Helpers.cs +++ b/src/Linq2GraphQL.Generator/GraphQLSchema/Helpers.cs @@ -1,7 +1,18 @@ -namespace Linq2GraphQL.Generator; +using System.Text.RegularExpressions; + +namespace Linq2GraphQL.Generator; public static class Helpers { + + internal static string SummarySafe(string text) + { + if (string.IsNullOrEmpty(text)) { return text; } + + return Regex.Replace(text, @"\r\n?|\n", Environment.NewLine + "/// "); + + } + public static readonly Dictionary TypeMapping = new(StringComparer.InvariantCultureIgnoreCase) { diff --git a/src/Linq2GraphQL.Generator/GraphQLSchema/RootSchema.cs b/src/Linq2GraphQL.Generator/GraphQLSchema/RootSchema.cs index 10acb58b..b86449d3 100644 --- a/src/Linq2GraphQL.Generator/GraphQLSchema/RootSchema.cs +++ b/src/Linq2GraphQL.Generator/GraphQLSchema/RootSchema.cs @@ -3,6 +3,7 @@ using System.Runtime.Serialization; using System.Security.AccessControl; using System.Text.Json.Serialization; +using System.Text.RegularExpressions; namespace Linq2GraphQL.Generator; @@ -110,6 +111,7 @@ public class EnumValue { public string Name { get; set; } public string Description { get; set; } + public string GetCSharpName() { @@ -121,6 +123,8 @@ public string GetCSharpName() } + + public class BaseField { @@ -129,6 +133,8 @@ public class BaseField public bool HasDescription => !string.IsNullOrEmpty(Description); + public string SummaryDescription => Helpers.SummarySafe(Description); + public string CSharpName => Name?.ToPascalCase(); public GraphqlType GraphqlType { get; set; } @@ -146,7 +152,7 @@ public CoreType CoreType } } - + } @@ -224,6 +230,8 @@ public class BaseType public bool HasDescription => !string.IsNullOrEmpty(Description); + public string SummaryDescription => Helpers.SummarySafe(Description); + public string CSharpName => Name?.ToPascalCase(); public string FileName => CSharpName + ".cs"; diff --git a/src/Linq2GraphQL.Generator/Templates/Class/ClassTemplate.cs b/src/Linq2GraphQL.Generator/Templates/Class/ClassTemplate.cs index f7f48997..aa6121e6 100644 --- a/src/Linq2GraphQL.Generator/Templates/Class/ClassTemplate.cs +++ b/src/Linq2GraphQL.Generator/Templates/Class/ClassTemplate.cs @@ -164,7 +164,7 @@ public virtual string TransformText() this.Write("/// \r\n/// "); #line 33 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Class\ClassTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(classType.Description)); + this.Write(this.ToStringHelper.ToStringWithCulture(classType.SummaryDescription)); #line default #line hidden @@ -270,7 +270,7 @@ public virtual string TransformText() this.Write(" /// \r\n /// "); #line 51 "C:\Code\Github\Linq2GraphQL.Client\src\Linq2GraphQL.Generator\Templates\Class\ClassTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(field.Description)); + this.Write(this.ToStringHelper.ToStringWithCulture(field.SummaryDescription)); #line default #line hidden diff --git a/src/Linq2GraphQL.Generator/Templates/Class/ClassTemplate.tt b/src/Linq2GraphQL.Generator/Templates/Class/ClassTemplate.tt index 6ba10a49..85ee99ef 100644 --- a/src/Linq2GraphQL.Generator/Templates/Class/ClassTemplate.tt +++ b/src/Linq2GraphQL.Generator/Templates/Class/ClassTemplate.tt @@ -30,7 +30,7 @@ public static class <#= classType.Name #>Extensions #> <# if (classType.HasDescription) {#> /// -/// <#= classType.Description #> +/// <#= classType.SummaryDescription #> /// <# } @@ -48,7 +48,7 @@ public partial class <#= classType.Name #> <#= classType.GetInterfacesString("Gr <# } else { #> <# if (field.HasDescription) { #> /// - /// <#= field.Description #> + /// <#= field.SummaryDescription #> /// <# } #> [GraphQLMember("<#= field.Name #>")]