{"repo":"Husqvik/GraphQlClientGenerator","free":true,"listed":false,"github":"https://github.com/Husqvik/GraphQlClientGenerator","clone":"git clone https://github.com/Husqvik/GraphQlClientGenerator.git","description":"GraphQL C# client generator","language":"C#","stars":230,"topics":["graphql","query-builder","c-sharp","c-sharp-library"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"GraphQL C# client generator ======================= This simple console app generates C# GraphQL query builder and data classes for simple, compiler checked, usage of a GraphQL API. ---------- Generator app usage ------------- Nuget package ------------- Installation: dotnet tool ------------- Code ------------- Code example for class generation: or using full blown setup: C# 9 source generator ------------- C# 9 introduced source generators that can be attached to compilation process. Generated classes will be automatically included in project. Project file example: Query builder usage ------------- results into Mutation ------------- result: Field exclusion ------------- Sometimes there is a need to select almost all fields of a queried object except few. In that case Except methods can be used often in conjunction with WithAllFields or WithAllScalarFields . result: Aliases ------------- Queried fields can be freely renamed to match target data classes using GraphQL aliases. result: Query parameters ------------- result: Directives ------------- result: Inline fragments ------------- result: Custom scalar types ------------- GraphQL supports custom scalar types. By default these are mapped to object type. To ensure appropriate .NET types are generated for data class properties custom mapping interface can be used: Generated class example: vs. C# 9 source generator custom types Source generator supports RegexScalarFieldTypeMappingProvider rules using JSON configuration file.","default_branch":null,"files":null,"tree":[],"storefront":"/r/Husqvik","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Husqvik/GraphQlClientGenerator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}