| | | 1 | | // <auto-generated/> |
| | | 2 | | |
| | | 3 | | #nullable enable |
| | | 4 | | #pragma warning disable |
| | | 5 | | |
| | | 6 | | using System; |
| | | 7 | | using System.Runtime.CompilerServices; |
| | | 8 | | using HotChocolate; |
| | | 9 | | using HotChocolate.Types; |
| | | 10 | | using HotChocolate.Execution.Configuration; |
| | | 11 | | using Microsoft.Extensions.DependencyInjection; |
| | | 12 | | using HotChocolate.Internal; |
| | | 13 | | |
| | | 14 | | namespace Api.Works.Queries |
| | | 15 | | { |
| | | 16 | | public static partial class WorkNode |
| | | 17 | | { |
| | | 18 | | internal static void Initialize(global::HotChocolate.Types.IObjectTypeDescriptor<global::Api.Works.Queries.Work> |
| | | 19 | | { |
| | | 20 | | var extension = descriptor.Extend(); |
| | | 21 | | var configuration = extension.Configuration; |
| | | 22 | | var thisType = typeof(global::Api.Works.Queries.WorkNode); |
| | | 23 | | var bindingResolver = extension.Context.ParameterBindingResolver; |
| | | 24 | | var resolvers = new __Resolvers(bindingResolver); |
| | | 25 | | |
| | | 26 | | var naming = descriptor.Extend().Context.Naming; |
| | | 27 | | |
| | | 28 | | descriptor |
| | | 29 | | .Field(naming.GetMemberName("Authors", global::HotChocolate.Types.MemberKind.ObjectField)) |
| | | 30 | | .ExtendWith(static (field, context) => |
| | | 31 | | { |
| | | 32 | | var configuration = field.Configuration; |
| | | 33 | | var typeInspector = field.Context.TypeInspector; |
| | | 34 | | var bindingResolver = field.Context.ParameterBindingResolver; |
| | | 35 | | var naming = field.Context.Naming; |
| | | 36 | | |
| | | 37 | | configuration.Type = global::HotChocolate.Types.Descriptors.TypeReference.Create( |
| | | 38 | | typeInspector.GetTypeRef(typeof(global::Api.Works.Queries.Author), HotChocolate.Types.TypeContex |
| | | 39 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.ListTypeNode |
| | | 40 | | configuration.ResultType = typeof(global::System.Collections.Generic.IReadOnlyList<global::Api.Works |
| | | 41 | | configuration.DeclaringType = context.ThisType; |
| | | 42 | | |
| | | 43 | | configuration.SetSourceGeneratorFlags(); |
| | | 44 | | |
| | | 45 | | var bindingInfo = field.Context.ParameterBindingResolver; |
| | | 46 | | var parameter = context.Resolvers.CreateParameterDescriptor_GetAuthorsByWorkAsync_authorIdLoader(); |
| | | 47 | | var parameterInfo = bindingInfo.GetBindingInfo(parameter); |
| | | 48 | | |
| | | 49 | | if(parameterInfo.Kind is global::HotChocolate.Internal.ArgumentKind.Argument) |
| | | 50 | | { |
| | | 51 | | var argumentConfiguration = new global::HotChocolate.Types.Descriptors.Configurations.ArgumentCo |
| | | 52 | | { |
| | | 53 | | Name = naming.GetMemberName("authorIdLoader", global::HotChocolate.Types.MemberKind.Argument |
| | | 54 | | Type = global::HotChocolate.Types.Descriptors.TypeReference.Create( |
| | | 55 | | typeInspector.GetTypeRef(typeof(global::Api.Works.Queries.WorkDataLoaders.IAuthorIdByWor |
| | | 56 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.Name |
| | | 57 | | RuntimeType = typeof(global::Api.Works.Queries.WorkDataLoaders.IAuthorIdByWorkIdDataLoader) |
| | | 58 | | }; |
| | | 59 | | |
| | | 60 | | configuration.Arguments.Add(argumentConfiguration); |
| | | 61 | | } |
| | | 62 | | |
| | | 63 | | parameter = context.Resolvers.CreateParameterDescriptor_GetAuthorsByWorkAsync_authorLoader(); |
| | | 64 | | parameterInfo = bindingInfo.GetBindingInfo(parameter); |
| | | 65 | | |
| | | 66 | | if(parameterInfo.Kind is global::HotChocolate.Internal.ArgumentKind.Argument) |
| | | 67 | | { |
| | | 68 | | var argumentConfiguration = new global::HotChocolate.Types.Descriptors.Configurations.ArgumentCo |
| | | 69 | | { |
| | | 70 | | Name = naming.GetMemberName("authorLoader", global::HotChocolate.Types.MemberKind.Argument), |
| | | 71 | | Type = global::HotChocolate.Types.Descriptors.TypeReference.Create( |
| | | 72 | | typeInspector.GetTypeRef(typeof(global::Api.Works.Queries.AuthorDataLoaders.IAuthorByIdD |
| | | 73 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.Name |
| | | 74 | | RuntimeType = typeof(global::Api.Works.Queries.AuthorDataLoaders.IAuthorByIdDataLoader) |
| | | 75 | | }; |
| | | 76 | | |
| | | 77 | | configuration.Arguments.Add(argumentConfiguration); |
| | | 78 | | } |
| | | 79 | | |
| | | 80 | | configuration.Member = context.ThisType.GetMethod( |
| | | 81 | | "GetAuthorsByWorkAsync", |
| | | 82 | | global::HotChocolate.Utilities.ReflectionUtils.StaticMemberFlags, |
| | | 83 | | new global::System.Type[] |
| | | 84 | | { |
| | | 85 | | typeof(global::Api.Works.Queries.Work), |
| | | 86 | | typeof(global::Api.Works.Queries.WorkDataLoaders.IAuthorIdByWorkIdDataLoader), |
| | | 87 | | typeof(global::Api.Works.Queries.AuthorDataLoaders.IAuthorByIdDataLoader), |
| | | 88 | | typeof(global::System.Threading.CancellationToken) |
| | | 89 | | })!; |
| | | 90 | | |
| | | 91 | | var fieldDescriptor = global::HotChocolate.Types.Descriptors.ObjectFieldDescriptor.From(field.Contex |
| | | 92 | | HotChocolate.Internal.ConfigurationHelper.ApplyConfiguration( |
| | | 93 | | field.Context, |
| | | 94 | | fieldDescriptor, |
| | | 95 | | configuration.Member, |
| | | 96 | | new global::Api.Auth.Handlers.PermissionCheckAuthorizeAttribute((global::Api.Auth.Models.UserPer |
| | | 97 | | |
| | | 98 | | bindingResolver.ApplyConfiguration( |
| | | 99 | | context.Resolvers.CreateParameterDescriptor_GetAuthorsByWorkAsync_authorIdLoader(), |
| | | 100 | | fieldDescriptor); |
| | | 101 | | |
| | | 102 | | bindingResolver.ApplyConfiguration( |
| | | 103 | | context.Resolvers.CreateParameterDescriptor_GetAuthorsByWorkAsync_authorLoader(), |
| | | 104 | | fieldDescriptor); |
| | | 105 | | |
| | | 106 | | configuration.ConfigurationsAreApplied = true; |
| | | 107 | | fieldDescriptor.CreateConfiguration(); |
| | | 108 | | |
| | | 109 | | configuration.Resolvers = context.Resolvers.GetAuthorsByWorkAsync(); |
| | | 110 | | configuration.ResultPostProcessor = global::HotChocolate.Execution.ListPostProcessor<global::Api.Wor |
| | | 111 | | }, |
| | | 112 | | (Resolvers: resolvers, ThisType: thisType)); |
| | | 113 | | |
| | | 114 | | descriptor |
| | | 115 | | .Field(naming.GetMemberName("Tags", global::HotChocolate.Types.MemberKind.ObjectField)) |
| | | 116 | | .ExtendWith(static (field, context) => |
| | | 117 | | { |
| | | 118 | | var configuration = field.Configuration; |
| | | 119 | | var typeInspector = field.Context.TypeInspector; |
| | | 120 | | var bindingResolver = field.Context.ParameterBindingResolver; |
| | | 121 | | var naming = field.Context.Naming; |
| | | 122 | | |
| | | 123 | | configuration.Type = global::HotChocolate.Types.Descriptors.TypeReference.Create( |
| | | 124 | | typeInspector.GetTypeRef(typeof(global::Api.Works.Queries.Tag), HotChocolate.Types.TypeContext.O |
| | | 125 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.ListTypeNode |
| | | 126 | | configuration.ResultType = typeof(global::System.Collections.Generic.IReadOnlyList<global::Api.Works |
| | | 127 | | configuration.DeclaringType = context.ThisType; |
| | | 128 | | |
| | | 129 | | configuration.SetSourceGeneratorFlags(); |
| | | 130 | | |
| | | 131 | | var bindingInfo = field.Context.ParameterBindingResolver; |
| | | 132 | | var parameter = context.Resolvers.CreateParameterDescriptor_GetTagsByWorkAsync_tagIdsByWorkLoader(); |
| | | 133 | | var parameterInfo = bindingInfo.GetBindingInfo(parameter); |
| | | 134 | | |
| | | 135 | | if(parameterInfo.Kind is global::HotChocolate.Internal.ArgumentKind.Argument) |
| | | 136 | | { |
| | | 137 | | var argumentConfiguration = new global::HotChocolate.Types.Descriptors.Configurations.ArgumentCo |
| | | 138 | | { |
| | | 139 | | Name = naming.GetMemberName("tagIdsByWorkLoader", global::HotChocolate.Types.MemberKind.Argu |
| | | 140 | | Type = global::HotChocolate.Types.Descriptors.TypeReference.Create( |
| | | 141 | | typeInspector.GetTypeRef(typeof(global::Api.Works.Queries.WorkDataLoaders.ITagIdsByWorkI |
| | | 142 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.Name |
| | | 143 | | RuntimeType = typeof(global::Api.Works.Queries.WorkDataLoaders.ITagIdsByWorkIdDataLoader) |
| | | 144 | | }; |
| | | 145 | | |
| | | 146 | | configuration.Arguments.Add(argumentConfiguration); |
| | | 147 | | } |
| | | 148 | | |
| | | 149 | | parameter = context.Resolvers.CreateParameterDescriptor_GetTagsByWorkAsync_tagByIdLoader(); |
| | | 150 | | parameterInfo = bindingInfo.GetBindingInfo(parameter); |
| | | 151 | | |
| | | 152 | | if(parameterInfo.Kind is global::HotChocolate.Internal.ArgumentKind.Argument) |
| | | 153 | | { |
| | | 154 | | var argumentConfiguration = new global::HotChocolate.Types.Descriptors.Configurations.ArgumentCo |
| | | 155 | | { |
| | | 156 | | Name = naming.GetMemberName("tagByIdLoader", global::HotChocolate.Types.MemberKind.Argument) |
| | | 157 | | Type = global::HotChocolate.Types.Descriptors.TypeReference.Create( |
| | | 158 | | typeInspector.GetTypeRef(typeof(global::Api.Works.Queries.TagNode.ITagByIdDataLoader), H |
| | | 159 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.Name |
| | | 160 | | RuntimeType = typeof(global::Api.Works.Queries.TagNode.ITagByIdDataLoader) |
| | | 161 | | }; |
| | | 162 | | |
| | | 163 | | configuration.Arguments.Add(argumentConfiguration); |
| | | 164 | | } |
| | | 165 | | |
| | | 166 | | parameter = context.Resolvers.CreateParameterDescriptor_GetTagsByWorkAsync_limit(); |
| | | 167 | | parameterInfo = bindingInfo.GetBindingInfo(parameter); |
| | | 168 | | |
| | | 169 | | if(parameterInfo.Kind is global::HotChocolate.Internal.ArgumentKind.Argument) |
| | | 170 | | { |
| | | 171 | | var argumentConfiguration = new global::HotChocolate.Types.Descriptors.Configurations.ArgumentCo |
| | | 172 | | { |
| | | 173 | | Name = naming.GetMemberName("limit", global::HotChocolate.Types.MemberKind.Argument), |
| | | 174 | | Type = global::HotChocolate.Types.Descriptors.TypeReference.Create( |
| | | 175 | | typeInspector.GetTypeRef(typeof(int), HotChocolate.Types.TypeContext.Input), |
| | | 176 | | new global::HotChocolate.Language.NamedTypeNode("int")), |
| | | 177 | | RuntimeType = typeof(int?) |
| | | 178 | | }; |
| | | 179 | | |
| | | 180 | | configuration.Arguments.Add(argumentConfiguration); |
| | | 181 | | } |
| | | 182 | | |
| | | 183 | | configuration.Member = context.ThisType.GetMethod( |
| | | 184 | | "GetTagsByWorkAsync", |
| | | 185 | | global::HotChocolate.Utilities.ReflectionUtils.StaticMemberFlags, |
| | | 186 | | new global::System.Type[] |
| | | 187 | | { |
| | | 188 | | typeof(global::Api.Works.Queries.Work), |
| | | 189 | | typeof(global::Api.Works.Queries.WorkDataLoaders.ITagIdsByWorkIdDataLoader), |
| | | 190 | | typeof(global::Api.Works.Queries.TagNode.ITagByIdDataLoader), |
| | | 191 | | typeof(int?), |
| | | 192 | | typeof(global::System.Threading.CancellationToken) |
| | | 193 | | })!; |
| | | 194 | | |
| | | 195 | | var fieldDescriptor = global::HotChocolate.Types.Descriptors.ObjectFieldDescriptor.From(field.Contex |
| | | 196 | | HotChocolate.Internal.ConfigurationHelper.ApplyConfiguration( |
| | | 197 | | field.Context, |
| | | 198 | | fieldDescriptor, |
| | | 199 | | configuration.Member, |
| | | 200 | | new global::Api.Auth.Handlers.PermissionCheckAuthorizeAttribute((global::Api.Auth.Models.UserPer |
| | | 201 | | |
| | | 202 | | bindingResolver.ApplyConfiguration( |
| | | 203 | | context.Resolvers.CreateParameterDescriptor_GetTagsByWorkAsync_tagIdsByWorkLoader(), |
| | | 204 | | fieldDescriptor); |
| | | 205 | | |
| | | 206 | | bindingResolver.ApplyConfiguration( |
| | | 207 | | context.Resolvers.CreateParameterDescriptor_GetTagsByWorkAsync_tagByIdLoader(), |
| | | 208 | | fieldDescriptor); |
| | | 209 | | |
| | | 210 | | bindingResolver.ApplyConfiguration( |
| | | 211 | | context.Resolvers.CreateParameterDescriptor_GetTagsByWorkAsync_limit(), |
| | | 212 | | fieldDescriptor); |
| | | 213 | | |
| | | 214 | | configuration.ConfigurationsAreApplied = true; |
| | | 215 | | fieldDescriptor.CreateConfiguration(); |
| | | 216 | | |
| | | 217 | | configuration.Resolvers = context.Resolvers.GetTagsByWorkAsync(); |
| | | 218 | | configuration.ResultPostProcessor = global::HotChocolate.Execution.ListPostProcessor<global::Api.Wor |
| | | 219 | | }, |
| | | 220 | | (Resolvers: resolvers, ThisType: thisType)); |
| | | 221 | | |
| | | 222 | | Configure(descriptor); |
| | | 223 | | } |
| | | 224 | | |
| | | 225 | | static partial void Configure(global::HotChocolate.Types.IObjectTypeDescriptor<global::Api.Works.Queries.Work> d |
| | | 226 | | |
| | | 227 | | private sealed class __Resolvers |
| | | 228 | | { |
| | | 229 | | private readonly global::HotChocolate.Internal.IParameterBinding _binding_GetAuthorsByWorkAsync_authorIdLoad |
| | | 230 | | private readonly global::HotChocolate.Internal.IParameterBinding _binding_GetAuthorsByWorkAsync_authorLoader |
| | | 231 | | private readonly global::HotChocolate.Internal.IParameterBinding _binding_GetTagsByWorkAsync_tagIdsByWorkLoa |
| | | 232 | | private readonly global::HotChocolate.Internal.IParameterBinding _binding_GetTagsByWorkAsync_tagByIdLoader; |
| | | 233 | | private readonly global::HotChocolate.Internal.IParameterBinding _binding_GetTagsByWorkAsync_limit; |
| | | 234 | | |
| | 1 | 235 | | public __Resolvers(global::HotChocolate.Resolvers.ParameterBindingResolver bindingResolver) |
| | 1 | 236 | | { |
| | 1 | 237 | | _binding_GetAuthorsByWorkAsync_authorIdLoader = bindingResolver.GetBinding(CreateParameterDescriptor_Get |
| | 1 | 238 | | _binding_GetAuthorsByWorkAsync_authorLoader = bindingResolver.GetBinding(CreateParameterDescriptor_GetAu |
| | 1 | 239 | | _binding_GetTagsByWorkAsync_tagIdsByWorkLoader = bindingResolver.GetBinding(CreateParameterDescriptor_Ge |
| | 1 | 240 | | _binding_GetTagsByWorkAsync_tagByIdLoader = bindingResolver.GetBinding(CreateParameterDescriptor_GetTags |
| | 1 | 241 | | _binding_GetTagsByWorkAsync_limit = bindingResolver.GetBinding(CreateParameterDescriptor_GetTagsByWorkAs |
| | 1 | 242 | | } |
| | | 243 | | |
| | | 244 | | public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_GetAuthorsByWorkAsync_aut |
| | 1 | 245 | | => new HotChocolate.Internal.ParameterDescriptor( |
| | 1 | 246 | | "authorIdLoader", |
| | 1 | 247 | | typeof(global::Api.Works.Queries.WorkDataLoaders.IAuthorIdByWorkIdDataLoader), |
| | 1 | 248 | | isNullable: false, |
| | 1 | 249 | | []); |
| | | 250 | | public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_GetAuthorsByWorkAsync_aut |
| | 1 | 251 | | => new HotChocolate.Internal.ParameterDescriptor( |
| | 1 | 252 | | "authorLoader", |
| | 1 | 253 | | typeof(global::Api.Works.Queries.AuthorDataLoaders.IAuthorByIdDataLoader), |
| | 1 | 254 | | isNullable: false, |
| | 1 | 255 | | []); |
| | | 256 | | |
| | | 257 | | public HotChocolate.Resolvers.FieldResolverDelegates GetAuthorsByWorkAsync() |
| | 1 | 258 | | => new global::HotChocolate.Resolvers.FieldResolverDelegates(resolver: GetAuthorsByWorkAsync); |
| | | 259 | | |
| | | 260 | | private async global::System.Threading.Tasks.ValueTask<global::System.Object?> GetAuthorsByWorkAsync(global: |
| | 1 | 261 | | { |
| | 1 | 262 | | var args0 = context.Parent<global::Api.Works.Queries.Work>(); |
| | 1 | 263 | | var args1 = _binding_GetAuthorsByWorkAsync_authorIdLoader.Execute<global::Api.Works.Queries.WorkDataLoad |
| | 1 | 264 | | var args2 = _binding_GetAuthorsByWorkAsync_authorLoader.Execute<global::Api.Works.Queries.AuthorDataLoad |
| | 1 | 265 | | var args3 = context.RequestAborted; |
| | 1 | 266 | | var result = await global::Api.Works.Queries.WorkNode.GetAuthorsByWorkAsync(args0, args1, args2, args3); |
| | 1 | 267 | | return result; |
| | 1 | 268 | | } |
| | | 269 | | |
| | | 270 | | public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_GetTagsByWorkAsync_tagIds |
| | 1 | 271 | | => new HotChocolate.Internal.ParameterDescriptor( |
| | 1 | 272 | | "tagIdsByWorkLoader", |
| | 1 | 273 | | typeof(global::Api.Works.Queries.WorkDataLoaders.ITagIdsByWorkIdDataLoader), |
| | 1 | 274 | | isNullable: false, |
| | 1 | 275 | | []); |
| | | 276 | | public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_GetTagsByWorkAsync_tagByI |
| | 1 | 277 | | => new HotChocolate.Internal.ParameterDescriptor( |
| | 1 | 278 | | "tagByIdLoader", |
| | 1 | 279 | | typeof(global::Api.Works.Queries.TagNode.ITagByIdDataLoader), |
| | 1 | 280 | | isNullable: false, |
| | 1 | 281 | | []); |
| | | 282 | | public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_GetTagsByWorkAsync_limit( |
| | 1 | 283 | | => new HotChocolate.Internal.ParameterDescriptor( |
| | 1 | 284 | | "limit", |
| | 1 | 285 | | typeof(int?), |
| | 1 | 286 | | isNullable: true, |
| | 1 | 287 | | []); |
| | | 288 | | |
| | | 289 | | public HotChocolate.Resolvers.FieldResolverDelegates GetTagsByWorkAsync() |
| | 1 | 290 | | => new global::HotChocolate.Resolvers.FieldResolverDelegates(resolver: GetTagsByWorkAsync); |
| | | 291 | | |
| | | 292 | | private async global::System.Threading.Tasks.ValueTask<global::System.Object?> GetTagsByWorkAsync(global::Ho |
| | 1 | 293 | | { |
| | 1 | 294 | | var args0 = context.Parent<global::Api.Works.Queries.Work>(); |
| | 1 | 295 | | var args1 = _binding_GetTagsByWorkAsync_tagIdsByWorkLoader.Execute<global::Api.Works.Queries.WorkDataLoa |
| | 1 | 296 | | var args2 = _binding_GetTagsByWorkAsync_tagByIdLoader.Execute<global::Api.Works.Queries.TagNode.ITagById |
| | 1 | 297 | | var args3 = _binding_GetTagsByWorkAsync_limit.Execute<int?>(context); |
| | 1 | 298 | | var args4 = context.RequestAborted; |
| | 1 | 299 | | var result = await global::Api.Works.Queries.WorkNode.GetTagsByWorkAsync(args0, args1, args2, args3, arg |
| | 1 | 300 | | return result; |
| | 1 | 301 | | } |
| | | 302 | | } |
| | | 303 | | } |
| | | 304 | | } |
| | | 305 | | |