GraphQL.Code.Generator 1.5.1

dotnet add package GraphQL.Code.Generator --version 1.5.1
                    
NuGet\Install-Package GraphQL.Code.Generator -Version 1.5.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GraphQL.Code.Generator" Version="1.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GraphQL.Code.Generator" Version="1.5.1" />
                    
Directory.Packages.props
<PackageReference Include="GraphQL.Code.Generator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GraphQL.Code.Generator --version 1.5.1
                    
#r "nuget: GraphQL.Code.Generator, 1.5.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=GraphQL.Code.Generator&version=1.5.1
                    
Install GraphQL.Code.Generator as a Cake Addin
#tool nuget:?package=GraphQL.Code.Generator&version=1.5.1
                    
Install GraphQL.Code.Generator as a Cake Tool

1.5.1 Remvoed delimiter character from WhereWithDistinctBy in Repository class methods. Now, delimiter is part of DistinctByInput.

1.5.0.1 Added Linq.Extension.Grouping namespace in default namespaces of Repository.

1.5.0 Added GroupByOperationOn queries and related repository. This will provide option to group by on multiple fields (, separated fields) and then perform an operation like count, sum, max or min on another field. Also provide option to apply where and pagination on group by.

1.4.0 Added Distinct, DistinctBy, and GroupBy functionalities.

/////////////////////////////////////// Pagination and Search Example //////////////////////////////////////////////////////////////////////

"Query" : query($pagination: PaginationInputType, $search: SearchInputType) {order(pagination: $pagination, search: $search) {id, orderDate quantity customerId}} ,"Variables" :{ "pagination" : {"take": 100, "skip": 100, "sorts": [{"fieldName": "created", "direction": "desc"}, {"fieldName": "quantity", "direction": "asc"}]}, "search" : {"filters": [{ "logic": "or", "operation": "eq", "value": 3245, "fieldName": "orderId" }, { "logic": "and", "operation": "inlist", "value": "32,66,87,199", "fieldName": "customerId" }, { "logic": "and", "operation": "gte", "value": 600, "fieldName": "customerId" } ]}}

///////////////////////////////////// List of Operators //////////////////////////////////////////////////////////////////////////////////////////

gte, gt, eq, neq, lte, lt, contains, notcontains, startswith, endswith, inlist, notinlist

///////////////////////////////////////Configuration Section//////////////////////////////////////////////////////////////////////////////////// Configuration.UseDataAnnotationsToFindKeys = true; Configuration.MakeAllFieldsOfViewNullable = true; Configuration.ViewNameFilter = new Regex(@"^Vw.*$"); Configuration.ElementsToGenerate = Configuration.Elements.Types | Configuration.Elements.Repositoy | Configuration.Elements.Query; Configuration.ORMType = Configuration.ORMTypes.EFCore;

Configuration.TypeClasses.RepositoryConstructorParameter = "RepositoryNamespace.RepositoryClass repositoryConstructorMemberName"; Configuration.TypeClasses.RepositoryPrivateMember = "RepositoryNamespace.RepositoryClass repositoryPrivateMemberName"; // In constructor of Type class it will translate as this.repositoryPrivateMemberName = respositoryConstructorMemberName;

Configuration.TypeClasses.TypeClassesNamespace = "GraphQL.Types.Custom"; // This will translate as namespace GraphQL.Types.Custom {...

Configuration.TypeClasses.EntityClassesNamespacesInclude = new Regex(@"^EntitiesNamespace$", RegexOptions.IgnoreCase); // Any namespace in input dll (where entities classes are) match above regular expression will be included.

Configuration.TypeClasses.EntityClassNamesExclude = new Regex(@"^Rusp.*$|^DatabaseInitializer$|^DBManager$|^DataSeeder$", RegexOptions.IgnoreCase); // Any class match above regular expression will be excluded

Configuration.TypeClasses.AdditionalNamespaces = "MyNamespace1, MyNamespace2";

string path = @"c:\dllFolder\EntitiesAssembly.dll";

Configuration.InputDllNameAndPath = path; Configuration.TypeClasses.EntityClassNamesInclude = new Regex(@"^DomainClass1$|^DomainClass2$", RegexOptions.IgnoreCase); // Any class in input dll (where entities classes are) match above regular expression will be included.

Dictionary<string, string> pluralizationFilter = new Dictionary<string, string>(); pluralizationFilter.Add("Person", "Persons"); Configuration.PluralizationFilter = pluralizationFilter;

Configuration.TypeClasses.AdditionalCodeToBeAddedInConstructor = "InitializePartial();"; //Above setting will create InitializePartial(); in the Type Classes constructor and this can be used to call partial class method. If you don't have InitializePartial in your // partial class or you don't have partial class at all then remove above line. But you can add this later if in all the classes you called some partial class method.

Configuration.RepositoryClass.DBContextPrivateMember = "MyDbContextNamespace.MyDbContextclass _context"; Configuration.RepositoryClass.DBContextConstructorParameter = "MyDbContextNamespace.MyDbContextclass context"; Configuration.RepositoryClass.RepositoryClassName = "CustomRepository"; Configuration.RepositoryClass.RepositoryClassesNamespace = "Custom.Repository.namespace"; Configuration.RepositoryClass.AdditionalNamespaces = "MyNamespace1, MyNamespace2"; //Configuration.RepositoryClass.MethodExcludeFilter = new List<string> { "GetPersons" }; //Configuration.RepositoryClass.IsMethodExcludeFilterApplyToInterface = true;

Configuration.QueryClass.RepositoryConstructorParameter = "RepositoryNamespace.RepositoryClass rMp1oViPb3EdvcJ5kxoqe52RuaiK6YiUYo"; Configuration.QueryClass.RepositoryPrivateMember Configuration.QueryClass.QueryClassName = "CustomGraphQLQuery"; Configuration.QueryClass.QueryClassNamespace = "Graph.Queries"; Configuration.QueryClass.AdditionalNamespaces = "MyNamespace1, MyNamespace2";

int fileCount = GraphQL.Code.Generator.GraphQLCodeGenerator.GenerateGraphQLCode();

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
.NET Framework net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 was computed.  net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.1 196 10 months ago
1.5.0.1 117 10 months ago
1.5.0 109 10 months ago
1.4.0.2 119 10 months ago
1.4.0.1 125 10 months ago
1.4.0 134 10 months ago
1.3.0.1 111 6/3/2024
1.2.0.5 482 11/8/2022
1.2.0.4 353 11/7/2022
1.2.0.3 2,426 7/29/2020
1.2.0.2 507 7/29/2020
1.2.0.1 483 7/28/2020
1.2.0 473 7/27/2020

1.5.1 Remvoed delimiter character from WhereWithDistinctBy. Now, delimiter is part of DistinctByInput.