| | | 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.Files.Queries |
| | | 15 | | { |
| | | 16 | | public static partial class FileRecordNode |
| | | 17 | | { |
| | | 18 | | internal static void Initialize(global::HotChocolate.Types.IObjectTypeDescriptor<global::Api.Files.Queries.FileR |
| | | 19 | | { |
| | | 20 | | var extension = descriptor.Extend(); |
| | | 21 | | var configuration = extension.Configuration; |
| | | 22 | | var thisType = typeof(global::Api.Files.Queries.FileRecordNode); |
| | | 23 | | var bindingResolver = extension.Context.ParameterBindingResolver; |
| | | 24 | | var resolvers = new __Resolvers(); |
| | | 25 | | |
| | | 26 | | var naming = descriptor.Extend().Context.Naming; |
| | | 27 | | |
| | | 28 | | descriptor |
| | | 29 | | .Field(naming.GetMemberName("sha256", 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(string), HotChocolate.Types.TypeContext.Output), |
| | | 39 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.NamedTypeNod |
| | | 40 | | configuration.ResultType = typeof(string); |
| | | 41 | | configuration.DeclaringType = context.ThisType; |
| | | 42 | | |
| | | 43 | | configuration.SetSourceGeneratorFlags(); |
| | | 44 | | |
| | | 45 | | configuration.Member = context.ThisType.GetMethod( |
| | | 46 | | "GetSha256", |
| | | 47 | | global::HotChocolate.Utilities.ReflectionUtils.StaticMemberFlags, |
| | | 48 | | new global::System.Type[] |
| | | 49 | | { |
| | | 50 | | typeof(global::Api.Files.Queries.FileRecord) |
| | | 51 | | })!; |
| | | 52 | | |
| | | 53 | | var fieldDescriptor = global::HotChocolate.Types.Descriptors.ObjectFieldDescriptor.From(field.Contex |
| | | 54 | | HotChocolate.Internal.ConfigurationHelper.ApplyConfiguration( |
| | | 55 | | field.Context, |
| | | 56 | | fieldDescriptor, |
| | | 57 | | configuration.Member, |
| | | 58 | | new global::Api.Auth.Handlers.PermissionCheckAuthorizeAttribute(global::Api.Auth.Models.UserPerm |
| | | 59 | | configuration.ConfigurationsAreApplied = true; |
| | | 60 | | fieldDescriptor.CreateConfiguration(); |
| | | 61 | | |
| | | 62 | | configuration.Resolvers = context.Resolvers.GetSha256(); |
| | | 63 | | }, |
| | | 64 | | (Resolvers: resolvers, ThisType: thisType)); |
| | | 65 | | |
| | | 66 | | Configure(descriptor); |
| | | 67 | | } |
| | | 68 | | |
| | | 69 | | static partial void Configure(global::HotChocolate.Types.IObjectTypeDescriptor<global::Api.Files.Queries.FileRec |
| | | 70 | | |
| | | 71 | | private sealed class __Resolvers |
| | | 72 | | { |
| | | 73 | | public HotChocolate.Resolvers.FieldResolverDelegates GetSha256() |
| | 1 | 74 | | { |
| | 1 | 75 | | return new global::HotChocolate.Resolvers.FieldResolverDelegates(pureResolver: GetSha256); |
| | 1 | 76 | | } |
| | | 77 | | |
| | | 78 | | private global::System.Object? GetSha256(global::HotChocolate.Resolvers.IResolverContext context) |
| | 1 | 79 | | { |
| | 1 | 80 | | var args0 = context.Parent<global::Api.Files.Queries.FileRecord>(); |
| | 1 | 81 | | var result = global::Api.Files.Queries.FileRecordNode.GetSha256(args0); |
| | 1 | 82 | | return result; |
| | 1 | 83 | | } |
| | | 84 | | } |
| | | 85 | | } |
| | | 86 | | } |
| | | 87 | | |