< Summary

Line coverage
52%
Covered lines: 10
Uncovered lines: 9
Coverable lines: 19
Total lines: 138
Line coverage: 52.6%
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

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
CreateParameterDescriptor_UpdateTagAsync_input()100%11100%
UpdateTagAsync()100%11100%
UpdateTagAsync()100%210%

File(s)

/home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/obj/Debug/net10.0/generated/HotChocolate.Types.Analyzers/HotChocolate.Types.Analyzers.GraphQLServerGenerator/UpdateTagMutations.5K_PEMQ_7wff-4-lE1HACg.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.Works.Mutations
 15{
 16    public static partial class UpdateTagMutations
 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.Works.Mutations.UpdateTagMutations);
 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.Works.Mutations.UpdateTagMutations),
 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("UpdateTag", 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.Works.Mutations.UpdateTagPayload), HotChocolate.Type
 46                        new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.NamedTypeNod
 47                    configuration.ResultType = typeof(global::Api.Works.Mutations.UpdateTagPayload);
 48                    configuration.DeclaringType = context.ThisType;
 49
 50                    configuration.SetSourceGeneratorFlags();
 51
 52                    var bindingInfo = field.Context.ParameterBindingResolver;
 53                    var parameter = context.Resolvers.CreateParameterDescriptor_UpdateTagAsync_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.Works.Mutations.UpdateTagInput), HotChocolat
 63                                new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.Name
 64                            RuntimeType = typeof(global::Api.Works.Mutations.UpdateTagInput)
 65                        };
 66
 67                        configuration.Arguments.Add(argumentConfiguration);
 68                    }
 69
 70                    configuration.Member = context.ThisType.GetMethod(
 71                        "UpdateTagAsync",
 72                        global::HotChocolate.Utilities.ReflectionUtils.StaticMemberFlags,
 73                        new global::System.Type[]
 74                        {
 75                            typeof(global::Api.Database.PGContext),
 76                            typeof(global::Api.Database.Utils.IEFTransactionDIAccessorService),
 77                            typeof(global::FluentValidation.IValidator<global::Api.Works.Mutations.UpdateTagInput>),
 78                            typeof(global::Api.Works.Mutations.UpdateTagInput),
 79                            typeof(global::System.Threading.CancellationToken)
 80                        })!;
 81
 82                    var fieldDescriptor = global::HotChocolate.Types.Descriptors.ObjectFieldDescriptor.From(field.Contex
 83                    HotChocolate.Internal.ConfigurationHelper.ApplyConfiguration(
 84                        field.Context,
 85                        fieldDescriptor,
 86                        configuration.Member,
 87                        new global::Api.Auth.Handlers.PermissionCheckAuthorizeAttribute((global::Api.Auth.Models.UserPer
 88                        new global::HotChocolate.Types.ErrorAttribute(typeof(global::Api.Utils.DomainError)));
 89
 90                    bindingResolver.ApplyConfiguration(
 91                        context.Resolvers.CreateParameterDescriptor_UpdateTagAsync_input(),
 92                        fieldDescriptor);
 93
 94                    configuration.ConfigurationsAreApplied = true;
 95                    fieldDescriptor.CreateConfiguration();
 96
 97                    configuration.Resolvers = context.Resolvers.UpdateTagAsync();
 98                },
 99                (Resolvers: resolvers, ThisType: thisType));
 100
 101            Configure(descriptor);
 102        }
 103
 104        static partial void Configure(global::HotChocolate.Types.IObjectTypeDescriptor descriptor);
 105
 106        private sealed class __Resolvers
 107        {
 108            private readonly global::HotChocolate.Internal.IParameterBinding _binding_UpdateTagAsync_input;
 109
 1110            public __Resolvers(global::HotChocolate.Resolvers.ParameterBindingResolver bindingResolver)
 1111            {
 1112                _binding_UpdateTagAsync_input = bindingResolver.GetBinding(CreateParameterDescriptor_UpdateTagAsync_inpu
 1113            }
 114
 115            public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_UpdateTagAsync_input()
 1116                => new HotChocolate.Internal.ParameterDescriptor(
 1117                    "input",
 1118                    typeof(global::Api.Works.Mutations.UpdateTagInput),
 1119                    isNullable: false,
 1120                    []);
 121
 122            public HotChocolate.Resolvers.FieldResolverDelegates UpdateTagAsync()
 1123                => new global::HotChocolate.Resolvers.FieldResolverDelegates(resolver: UpdateTagAsync);
 124
 125            private async global::System.Threading.Tasks.ValueTask<global::System.Object?> UpdateTagAsync(global::HotCho
 0126            {
 0127                var args0 = context.Service<global::Api.Database.PGContext>();
 0128                var args1 = context.Service<global::Api.Database.Utils.IEFTransactionDIAccessorService>();
 0129                var args2 = context.Service<global::FluentValidation.IValidator<global::Api.Works.Mutations.UpdateTagInp
 0130                var args3 = _binding_UpdateTagAsync_input.Execute<global::Api.Works.Mutations.UpdateTagInput>(context);
 0131                var args4 = context.RequestAborted;
 0132                var result = await global::Api.Works.Mutations.UpdateTagMutations.UpdateTagAsync(args0, args1, args2, ar
 0133                return result;
 0134            }
 135        }
 136    }
 137}
 138