File tree Expand file tree Collapse file tree
src/Linq2GraphQL.Generator/Templates/Class Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public static class <#= classType.Name #>Extensions
1919 [GraphMethod("<#= field.Name #>")]
2020 public static <#= GetFieldCSharpName(field) #> <#= field.CSharpName #>(this <#= classType.Name #> <#= classType.Name.ToCamelCase() #>, <#= field.GetArgString(true) #>)
2121 {
22- return <#= classType.Name.ToCamelCase() #>.GetMethodValue<<#= GetFieldCSharpName(field) #>>("<#= field.Name #>", <#= field.GetArgNames() #>);
22+ return <#= classType.Name.ToCamelCase() #>.GetMethodValue<<#= GetFieldCSharpName(field) #>>("<#= field.Name #>", <#= field.GetArgNames() #>);
2323 }
2424
2525<# } #>
@@ -28,6 +28,13 @@ public static class <#= classType.Name #>Extensions
2828<#
2929 }
3030#>
31+ <# if (classType.HasDescription) {#>
32+ /// <summary>
33+ /// <#= classType.Description #>
34+ /// </summary>
35+ <#
36+ }
37+ #>
3138public partial class <#= classType.Name #> <#= classType.GetInterfacesString("GraphQLTypeBase") #>
3239{
3340<# foreach (var field in classType.AllFields) { #>
@@ -40,8 +47,13 @@ public partial class <#= classType.Name #> <#= classType.GetInterfacesString("Gr
4047 public <#= GetFieldCSharpName(field) #> <#= field.CSharpName #> => _<#= field.Name #>.Value(() => GetFirstMethodValue<<#= GetFieldCSharpName(field) #>>("<#= field.Name #>"));
4148
4249<# } else { #>
50+ <# if (field.HasDescription) { #>
51+ /// <summary>
52+ /// <#= field.Description #>
53+ /// </summary>
54+ <# } #>
4355 [JsonPropertyName("<#= field.Name #>")]
44- public <#= GetFieldCSharpName(field) #> <#= field.CSharpName #> { get; set; }
56+ public <#= GetFieldCSharpName(field) #> <#= field.CSharpName #> { get; set; }
4557
4658<# } #>
4759<# } #>
You can’t perform that action at this time.
0 commit comments