| | | 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.Mutations |
| | | 15 | | { |
| | | 16 | | public static partial class AddAuthorMutations |
| | | 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.AddAuthorMutations); |
| | | 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.AddAuthorMutations), |
| | | 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("AddAuthor", 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.AddAuthorPayload), HotChocolate.Type |
| | | 46 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.NamedTypeNod |
| | | 47 | | configuration.ResultType = typeof(global::Api.Works.Mutations.AddAuthorPayload); |
| | | 48 | | configuration.DeclaringType = context.ThisType; |
| | | 49 | | |
| | | 50 | | configuration.SetSourceGeneratorFlags(); |
| | | 51 | | |
| | | 52 | | var bindingInfo = field.Context.ParameterBindingResolver; |
| | | 53 | | var parameter = context.Resolvers.CreateParameterDescriptor_AddAuthorAsync_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.AddAuthorInput), HotChocolat |
| | | 63 | | new global::HotChocolate.Language.NonNullTypeNode(new global::HotChocolate.Language.Name |
| | | 64 | | RuntimeType = typeof(global::Api.Works.Mutations.AddAuthorInput) |
| | | 65 | | }; |
| | | 66 | | |
| | | 67 | | configuration.Arguments.Add(argumentConfiguration); |
| | | 68 | | } |
| | | 69 | | |
| | | 70 | | configuration.Member = context.ThisType.GetMethod( |
| | | 71 | | "AddAuthorAsync", |
| | | 72 | | global::HotChocolate.Utilities.ReflectionUtils.StaticMemberFlags, |
| | | 73 | | new global::System.Type[] |
| | | 74 | | { |
| | | 75 | | typeof(global::Api.Database.PGContext), |
| | | 76 | | typeof(global::Api.Auth.Utils.ICurrentUserId), |
| | | 77 | | typeof(global::Api.Database.Utils.IEFTransactionDIAccessorService), |
| | | 78 | | typeof(global::Api.Works.Mutations.AddAuthorInput), |
| | | 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.UserPerm |
| | | 88 | | |
| | | 89 | | bindingResolver.ApplyConfiguration( |
| | | 90 | | context.Resolvers.CreateParameterDescriptor_AddAuthorAsync_input(), |
| | | 91 | | fieldDescriptor); |
| | | 92 | | |
| | | 93 | | configuration.ConfigurationsAreApplied = true; |
| | | 94 | | fieldDescriptor.CreateConfiguration(); |
| | | 95 | | |
| | | 96 | | configuration.Resolvers = context.Resolvers.AddAuthorAsync(); |
| | | 97 | | }, |
| | | 98 | | (Resolvers: resolvers, ThisType: thisType)); |
| | | 99 | | |
| | | 100 | | Configure(descriptor); |
| | | 101 | | } |
| | | 102 | | |
| | | 103 | | static partial void Configure(global::HotChocolate.Types.IObjectTypeDescriptor descriptor); |
| | | 104 | | |
| | | 105 | | private sealed class __Resolvers |
| | | 106 | | { |
| | | 107 | | private readonly global::HotChocolate.Internal.IParameterBinding _binding_AddAuthorAsync_input; |
| | | 108 | | |
| | 1 | 109 | | public __Resolvers(global::HotChocolate.Resolvers.ParameterBindingResolver bindingResolver) |
| | 1 | 110 | | { |
| | 1 | 111 | | _binding_AddAuthorAsync_input = bindingResolver.GetBinding(CreateParameterDescriptor_AddAuthorAsync_inpu |
| | 1 | 112 | | } |
| | | 113 | | |
| | | 114 | | public global::HotChocolate.Internal.ParameterDescriptor CreateParameterDescriptor_AddAuthorAsync_input() |
| | 1 | 115 | | => new HotChocolate.Internal.ParameterDescriptor( |
| | 1 | 116 | | "input", |
| | 1 | 117 | | typeof(global::Api.Works.Mutations.AddAuthorInput), |
| | 1 | 118 | | isNullable: false, |
| | 1 | 119 | | []); |
| | | 120 | | |
| | | 121 | | public HotChocolate.Resolvers.FieldResolverDelegates AddAuthorAsync() |
| | 1 | 122 | | => new global::HotChocolate.Resolvers.FieldResolverDelegates(resolver: AddAuthorAsync); |
| | | 123 | | |
| | | 124 | | private async global::System.Threading.Tasks.ValueTask<global::System.Object?> AddAuthorAsync(global::HotCho |
| | 1 | 125 | | { |
| | 1 | 126 | | var args0 = context.Service<global::Api.Database.PGContext>(); |
| | 1 | 127 | | var args1 = context.Service<global::Api.Auth.Utils.ICurrentUserId>(); |
| | 1 | 128 | | var args2 = context.Service<global::Api.Database.Utils.IEFTransactionDIAccessorService>(); |
| | 1 | 129 | | var args3 = _binding_AddAuthorAsync_input.Execute<global::Api.Works.Mutations.AddAuthorInput>(context); |
| | 1 | 130 | | var args4 = context.RequestAborted; |
| | 1 | 131 | | var result = await global::Api.Works.Mutations.AddAuthorMutations.AddAuthorAsync(args0, args1, args2, ar |
| | 1 | 132 | | return result; |
| | 1 | 133 | | } |
| | | 134 | | } |
| | | 135 | | } |
| | | 136 | | } |
| | | 137 | | |