| | | 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 FileRecordQuery |
| | | 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.Queries.FileRecordQuery); |
| | | 23 | | var bindingResolver = extension.Context.ParameterBindingResolver; |
| | | 24 | | var resolvers = new __Resolvers(); |
| | | 25 | | |
| | | 26 | | HotChocolate.Internal.ConfigurationHelper.ApplyConfiguration( |
| | | 27 | | extension.Context, |
| | | 28 | | descriptor, |
| | | 29 | | typeof(global::Api.Files.Queries.FileRecordQuery), |
| | | 30 | | new global::HotChocolate.Types.QueryTypeAttribute()); |
| | | 31 | | configuration.ConfigurationsAreApplied = true; |
| | | 32 | | |
| | | 33 | | var naming = descriptor.Extend().Context.Naming; |
| | | 34 | | |
| | | 35 | | descriptor |
| | | 36 | | .Field(naming.GetMemberName("FileRecords", global::HotChocolate.Types.MemberKind.ObjectField)) |
| | | 37 | | .AddPagingArguments() |
| | | 38 | | .ExtendWith(static (field, context) => |
| | | 39 | | { |
| | | 40 | | var configuration = field.Configuration; |
| | | 41 | | var typeInspector = field.Context.TypeInspector; |
| | | 42 | | var bindingResolver = field.Context.ParameterBindingResolver; |
| | | 43 | | var naming = field.Context.Naming; |
| | | 44 | | |
| | | 45 | | configuration.Type = typeInspector.GetTypeRef(typeof(global::HotChocolate.Types.NonNullType<global:: |
| | | 46 | | configuration.ResultType = typeof(global::HotChocolate.Types.Pagination.PageConnection<global::Api.F |
| | | 47 | | configuration.DeclaringType = context.ThisType; |
| | | 48 | | |
| | | 49 | | configuration.SetSourceGeneratorFlags(); |
| | | 50 | | configuration.SetConnectionFlags(); |
| | | 51 | | var pagingOptions = global::HotChocolate.Types.Pagination.PagingHelper.GetPagingOptions(field.Contex |
| | | 52 | | configuration.Features.Set(pagingOptions); |
| | | 53 | | |
| | | 54 | | configuration.Member = context.ThisType.GetMethod( |
| | | 55 | | "GetFileRecords", |
| | | 56 | | global::HotChocolate.Utilities.ReflectionUtils.StaticMemberFlags, |
| | | 57 | | new global::System.Type[] |
| | | 58 | | { |
| | | 59 | | typeof(global::Api.Database.PGContext), |
| | | 60 | | typeof(global::Api.Auth.Utils.ICurrentUserId), |
| | | 61 | | typeof(global::Api.Files.Queries.FileRecordDataLoaders.IFileRecordByIdDataLoader), |
| | | 62 | | typeof(global::GreenDonut.Data.QueryContext<global::Api.Files.Queries.FileRecord>), |
| | | 63 | | typeof(global::GreenDonut.Data.PagingArguments), |
| | | 64 | | typeof(global::System.Threading.CancellationToken) |
| | | 65 | | })!; |
| | | 66 | | |
| | | 67 | | var fieldDescriptor = global::HotChocolate.Types.Descriptors.ObjectFieldDescriptor.From(field.Contex |
| | | 68 | | HotChocolate.Internal.ConfigurationHelper.ApplyConfiguration( |
| | | 69 | | field.Context, |
| | | 70 | | fieldDescriptor, |
| | | 71 | | configuration.Member, |
| | | 72 | | new global::HotChocolate.Types.UseConnectionAttribute(), |
| | | 73 | | new global::Api.Auth.Handlers.PermissionCheckAuthorizeAttribute(global::Api.Auth.Models.UserPerm |
| | | 74 | | new global::HotChocolate.Data.UseFilteringAttribute(null, 22), |
| | | 75 | | new global::HotChocolate.Data.UseSortingAttribute(null, 23)); |
| | | 76 | | configuration.ConfigurationsAreApplied = true; |
| | | 77 | | fieldDescriptor.CreateConfiguration(); |
| | | 78 | | |
| | | 79 | | configuration.Resolvers = context.Resolvers.GetFileRecords(); |
| | | 80 | | configuration.ResultPostProcessor = global::HotChocolate.Execution.ListPostProcessor<global::Api.Fil |
| | | 81 | | }, |
| | | 82 | | (Resolvers: resolvers, ThisType: thisType)); |
| | | 83 | | |
| | | 84 | | Configure(descriptor); |
| | | 85 | | } |
| | | 86 | | |
| | | 87 | | static partial void Configure(global::HotChocolate.Types.IObjectTypeDescriptor descriptor); |
| | | 88 | | |
| | | 89 | | private sealed class __Resolvers |
| | | 90 | | { |
| | | 91 | | public HotChocolate.Resolvers.FieldResolverDelegates GetFileRecords() |
| | 1 | 92 | | => new global::HotChocolate.Resolvers.FieldResolverDelegates(resolver: GetFileRecords); |
| | | 93 | | |
| | | 94 | | private async global::System.Threading.Tasks.ValueTask<global::System.Object?> GetFileRecords(global::HotCho |
| | 1 | 95 | | { |
| | 1 | 96 | | var args0 = context.Service<global::Api.Database.PGContext>(); |
| | 1 | 97 | | var args1 = context.Service<global::Api.Auth.Utils.ICurrentUserId>(); |
| | 1 | 98 | | var args2 = context.Service<global::Api.Files.Queries.FileRecordDataLoaders.IFileRecordByIdDataLoader>() |
| | 1 | 99 | | var args3_selection = context.Selection; |
| | 1 | 100 | | var args3_filter = global::HotChocolate.Data.Filters.FilterContextResolverContextExtensions.GetFilterCon |
| | 1 | 101 | | var args3_sorting = global::HotChocolate.Data.Sorting.SortingContextResolverContextExtensions.GetSorting |
| | 1 | 102 | | var args3 = new global::GreenDonut.Data.QueryContext<global::Api.Files.Queries.FileRecord>( |
| | 1 | 103 | | global::HotChocolate.Execution.Processing.HotChocolateExecutionSelectionExtensions.AsSelector<global |
| | 1 | 104 | | args3_filter?.AsPredicate<global::Api.Files.Queries.FileRecord>(), |
| | 1 | 105 | | args3_sorting?.AsSortDefinition<global::Api.Files.Queries.FileRecord>()); |
| | 1 | 106 | | var args4_options = global::HotChocolate.Types.Pagination.PagingHelper.GetPagingOptions(context.Schema, |
| | 1 | 107 | | var args4_flags = global::HotChocolate.Types.Pagination.ConnectionFlagsHelper.GetConnectionFlags(context |
| | 1 | 108 | | var args4_first = context.ArgumentValue<int?>("first"); |
| | 1 | 109 | | var args4_after = context.ArgumentValue<string?>("after"); |
| | 1 | 110 | | int? args4_last = null; |
| | 1 | 111 | | string? args4_before = null; |
| | 1 | 112 | | bool args4_includeTotalCount = false; |
| | | 113 | | |
| | 1 | 114 | | if(args4_options.AllowBackwardPagination ?? global::HotChocolate.Types.Pagination.PagingDefaults.AllowBa |
| | 1 | 115 | | { |
| | 1 | 116 | | args4_last = context.ArgumentValue<int?>("last"); |
| | 1 | 117 | | args4_before = context.ArgumentValue<string?>("before"); |
| | 1 | 118 | | } |
| | | 119 | | |
| | 1 | 120 | | if(args4_first is null && args4_last is null) |
| | 0 | 121 | | { |
| | 0 | 122 | | args4_first = args4_options.DefaultPageSize ?? global::HotChocolate.Types.Pagination.PagingDefaults. |
| | 0 | 123 | | } |
| | | 124 | | |
| | 1 | 125 | | if(args4_options.IncludeTotalCount ?? global::HotChocolate.Types.Pagination.PagingDefaults.IncludeTotalC |
| | 0 | 126 | | { |
| | 0 | 127 | | args4_includeTotalCount = args4_flags.HasFlag(global::HotChocolate.Types.Pagination.ConnectionFlags. |
| | 0 | 128 | | } |
| | | 129 | | |
| | 1 | 130 | | var args4 = new global::GreenDonut.Data.PagingArguments( |
| | 1 | 131 | | args4_first, |
| | 1 | 132 | | args4_after, |
| | 1 | 133 | | args4_last, |
| | 1 | 134 | | args4_before, |
| | 1 | 135 | | args4_includeTotalCount) |
| | 1 | 136 | | { |
| | 1 | 137 | | EnableRelativeCursors = args4_flags.HasFlag(global::HotChocolate.Types.Pagination.ConnectionFlag |
| | 1 | 138 | | NullOrdering = args4_options.NullOrdering |
| | 1 | 139 | | }; |
| | 1 | 140 | | var args5 = context.RequestAborted; |
| | 1 | 141 | | var result = await global::Api.Files.Queries.FileRecordQuery.GetFileRecords(args0, args1, args2, args3, |
| | 1 | 142 | | return result; |
| | 1 | 143 | | } |
| | | 144 | | } |
| | | 145 | | } |
| | | 146 | | } |
| | | 147 | | |