< Summary

Line coverage
59%
Covered lines: 16
Uncovered lines: 11
Coverable lines: 27
Total lines: 171
Line coverage: 59.2%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/obj/Debug/net10.0/generated/HotChocolate.Types.Analyzers/HotChocolate.Types.Analyzers.GraphQLServerGenerator/UploadFileRecordContentMutations.MuAeZK5uwlVFtMhs568cXw.hc.g.cs

#LineLine coverage
 1// <auto-generated/>
 2
 3#nullable enable
 4#pragma warning disable
 5
 6using System;
 7using System.Runtime.CompilerServices;
 8using HotChocolate;
 9using HotChocolate.Types;
 10using HotChocolate.Execution.Configuration;
 11using Microsoft.Extensions.DependencyInjection;
 12using HotChocolate.Internal;
 13
 14namespace Api.Files.Mutations
 15{
 16    public static partial class UploadFileRecordContentMutations
 17    {
 18        internal static void Initialize(global::HotChocolate.Types.IObjectTypeDescriptor descriptor)
 19        {
 20            var extension = descriptor.Extend();
 21            var configuration = extension.Configuration;
 22            var thisType = typeof(global::Api.Files.Mutations.UploadFileRecordContentMutations);
 23            var bindingResolver = extension.Context.ParameterBindingResolver;
 24            var resolvers = new __Resolvers(bindingResolver);
 25
 26            HotChocolate.Internal.ConfigurationHelper.ApplyConfiguration(
 27                extension.Context,
 28                descriptor,
 29                typeof(global::Api.Files.Mutations.UploadFileRecordContentMutations),
 30                new global::HotChocolate.Types.MutationTypeAttribute());
 31            configuration.ConfigurationsAreApplied = true;
 32
 33            var naming = descriptor.Extend().Context.Naming;
 34
 35            descriptor
 36                .Field(naming.GetMemberName("UploadFileRecordContent", global::HotChocolate.Types.MemberKind.ObjectField
 37                .ExtendWith(static (field, context) =>
 38                {
 39                    var configuration = field.Configuration;
 40                    var typeInspector = field.Context.TypeInspector;
 41                    var bindingResolver = field.Context.ParameterBindingResolver;
 42                    var naming = field.Context.Naming;
 43
 44                    configuration.Type = global::HotChocolate.Types.Descriptors.TypeReference.Create(
 45                        typeInspector.GetTypeRef(typeof(global::Api.Files.Mutations.UploadFileRecordContentPayload), Hot
 46                        new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.NamedTypeNod
 47                    configuration.ResultType = typeof(global::Api.Files.Mutations.UploadFileRecordContentPayload);
 48                    configuration.DeclaringType = context.ThisType;
 49
 50                    configuration.SetSourceGeneratorFlags();
 51
 52                    var bindingInfo = field.Context.ParameterBindingResolver;
 53                    var parameter = context.Resolvers.CreateParameterDescriptor_UploadFileRecordContentAsync_input();
 54                    var parameterInfo = bindingInfo.GetBindingInfo(parameter);
 55
 56                    if(parameterInfo.Kind is global::HotChocolate.Internal.ArgumentKind.Argument)
 57                    {
 58                        var argumentConfiguration = new global::HotChocolate.Types.Descriptors.Configurations.ArgumentCo
 59                        {
 60                            Name = naming.GetMemberName("input", global::HotChocolate.Types.MemberKind.Argument),
 61                            Type = global::HotChocolate.Types.Descriptors.TypeReference.Create(
 62                                typeInspector.GetTypeRef(typeof(global::Api.Files.Mutations.UploadFileRecordContentInput
 63                                new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.Name
 64                            RuntimeType = typeof(global::Api.Files.Mutations.UploadFileRecordContentInput)
 65                        };
 66
 67                        configuration.Arguments.Add(argumentConfiguration);
 68                    }
 69
 70                    parameter = context.Resolvers.CreateParameterDescriptor_UploadFileRecordContentAsync_file();
 71                    parameterInfo = bindingInfo.GetBindingInfo(parameter);
 72
 73                    if(parameterInfo.Kind is global::HotChocolate.Internal.ArgumentKind.Argument)
 74                    {
 75                        var argumentConfiguration = new global::HotChocolate.Types.Descriptors.Configurations.ArgumentCo
 76                        {
 77                            Name = naming.GetMemberName("file", global::HotChocolate.Types.MemberKind.Argument),
 78                            Type = global::HotChocolate.Types.Descriptors.TypeReference.Create(
 79                                typeInspector.GetTypeRef(typeof(global::HotChocolate.Types.IFile), HotChocolate.Types.Ty
 80                                new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.Name
 81                            RuntimeType = typeof(global::HotChocolate.Types.IFile)
 82                        };
 83
 84                        configuration.Arguments.Add(argumentConfiguration);
 85                    }
 86
 87                    configuration.Member = context.ThisType.GetMethod(
 88                        "UploadFileRecordContentAsync",
 89                        global::HotChocolate.Utilities.ReflectionUtils.StaticMemberFlags,
 90                        new global::System.Type[]
 91                        {
 92                            typeof(global::Api.Auth.Utils.ICurrentUserId),
 93                            typeof(global::Api.Database.Utils.IEFTransactionDIAccessorService),
 94                            typeof(global::Api.Files.FileProviders.UserFileRouter),
 95                            typeof(global::FluentValidation.IValidator<global::Api.Files.Mutations.UploadFileRecordConte
 96                            typeof(global::Api.Files.Mutations.UploadFileRecordContentInput),
 97                            typeof(global::HotChocolate.Types.IFile),
 98                            typeof(global::System.Threading.CancellationToken)
 99                        })!;
 100
 101                    var fieldDescriptor = global::HotChocolate.Types.Descriptors.ObjectFieldDescriptor.From(field.Contex
 102                    HotChocolate.Internal.ConfigurationHelper.ApplyConfiguration(
 103                        field.Context,
 104                        fieldDescriptor,
 105                        configuration.Member,
 106                        new global::Api.Auth.Handlers.PermissionCheckAuthorizeAttribute(global::Api.Auth.Models.UserPerm
 107                        new global::HotChocolate.Types.ErrorAttribute(typeof(global::Api.Utils.DomainError)));
 108
 109                    bindingResolver.ApplyConfiguration(
 110                        context.Resolvers.CreateParameterDescriptor_UploadFileRecordContentAsync_input(),
 111                        fieldDescriptor);
 112
 113                    bindingResolver.ApplyConfiguration(
 114                        context.Resolvers.CreateParameterDescriptor_UploadFileRecordContentAsync_file(),
 115                        fieldDescriptor);
 116
 117                    configuration.ConfigurationsAreApplied = true;
 118                    fieldDescriptor.CreateConfiguration();
 119
 120                    configuration.Resolvers = context.Resolvers.UploadFileRecordContentAsync();
 121                },
 122                (Resolvers: resolvers, ThisType: thisType));
 123
 124            Configure(descriptor);
 125        }
 126
 127        static partial void Configure(global::HotChocolate.Types.IObjectTypeDescriptor descriptor);
 128
 129        private sealed class __Resolvers
 130        {
 131            private readonly global::HotChocolate.Internal.IParameterBinding _binding_UploadFileRecordContentAsync_input
 132            private readonly global::HotChocolate.Internal.IParameterBinding _binding_UploadFileRecordContentAsync_file;
 133
 1134            public __Resolvers(global::HotChocolate.Resolvers.ParameterBindingResolver bindingResolver)
 1135            {
 1136                _binding_UploadFileRecordContentAsync_input = bindingResolver.GetBinding(CreateParameterDescriptor_Uploa
 1137                _binding_UploadFileRecordContentAsync_file = bindingResolver.GetBinding(CreateParameterDescriptor_Upload
 1138            }
 139
 140            public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_UploadFileRecordContentAs
 1141                => new HotChocolate.Internal.ParameterDescriptor(
 1142                    "input",
 1143                    typeof(global::Api.Files.Mutations.UploadFileRecordContentInput),
 1144                    isNullable: false,
 1145                    []);
 146            public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_UploadFileRecordContentAs
 1147                => new HotChocolate.Internal.ParameterDescriptor(
 1148                    "file",
 1149                    typeof(global::HotChocolate.Types.IFile),
 1150                    isNullable: false,
 1151                    []);
 152
 153            public HotChocolate.Resolvers.FieldResolverDelegates UploadFileRecordContentAsync()
 1154                => new global::HotChocolate.Resolvers.FieldResolverDelegates(resolver: UploadFileRecordContentAsync);
 155
 156            private async global::System.Threading.Tasks.ValueTask<global::System.Object?> UploadFileRecordContentAsync(
 0157            {
 0158                var args0 = context.Service<global::Api.Auth.Utils.ICurrentUserId>();
 0159                var args1 = context.Service<global::Api.Database.Utils.IEFTransactionDIAccessorService>();
 0160                var args2 = context.Service<global::Api.Files.FileProviders.UserFileRouter>();
 0161                var args3 = context.Service<global::FluentValidation.IValidator<global::Api.Files.Mutations.UploadFileRe
 0162                var args4 = _binding_UploadFileRecordContentAsync_input.Execute<global::Api.Files.Mutations.UploadFileRe
 0163                var args5 = _binding_UploadFileRecordContentAsync_file.Execute<global::HotChocolate.Types.IFile>(context
 0164                var args6 = context.RequestAborted;
 0165                var result = await global::Api.Files.Mutations.UploadFileRecordContentMutations.UploadFileRecordContentA
 0166                return result;
 0167            }
 168        }
 169    }
 170}
 171