Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>HotChocolate.AspNetCore.Authorization</AssemblyName>
<RootNamespace>HotChocolate.AspNetCore.Authorization</RootNamespace>
<Description>This package contains the ASP.NET Core authorization integrations for Hot Chocolate.</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>HotChocolate.AspNetCore.CommandLine</AssemblyName>
<RootNamespace>HotChocolate.AspNetCore.CommandLine</RootNamespace>
<Description>This package contains the command line extensions for HotChocolate</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System.IO.Pipelines;
using System.Net;
using HotChocolate.AspNetCore.Formatters;
Expand Down Expand Up @@ -82,10 +79,6 @@ public ValueTask OnCreateAsync(
CancellationToken cancellationToken)
=> _requestInterceptor.OnCreateAsync(context, requestExecutor, requestBuilder, cancellationToken);

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public async Task<IExecutionResult> ExecuteSingleAsync(
HttpContext context,
GraphQLRequest request,
Expand Down Expand Up @@ -122,10 +115,6 @@ public async Task<IExecutionResult> ExecuteSingleAsync(
return await _executor.ExecuteAsync(operationRequest, context.RequestAborted);
}

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public async Task<IResponseStream> ExecuteOperationBatchAsync(
HttpContext context,
GraphQLRequest request,
Expand Down Expand Up @@ -153,10 +142,6 @@ public async Task<IResponseStream> ExecuteOperationBatchAsync(
cancellationToken: context.RequestAborted);
}

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public async Task<IResponseStream> ExecuteBatchAsync(
HttpContext context,
GraphQLRequest[] requests,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System.Net;
using Microsoft.AspNetCore.Http;
using HotChocolate.AspNetCore.Instrumentation;
Expand All @@ -10,10 +7,6 @@

namespace HotChocolate.AspNetCore;

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public sealed class HttpGetMiddleware : MiddlewareBase
{
public HttpGetMiddleware(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System.Runtime.InteropServices;
using System.Text.Encodings.Web;
using System.Text.Json;
Expand All @@ -20,10 +17,6 @@

namespace HotChocolate.AspNetCore;

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public sealed class HttpMultipartMiddleware : HttpPostMiddlewareBase
{
private const string Operations = "operations";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using HttpRequestDelegate = Microsoft.AspNetCore.Http.RequestDelegate;

namespace HotChocolate.AspNetCore;

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public sealed class HttpPostMiddleware(
HttpRequestDelegate next,
HttpRequestExecutorProxy executor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

namespace HotChocolate.AspNetCore;

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public abstract class HttpPostMiddlewareBase : MiddlewareBase
{
private const string BatchOperations = "batchOperations";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Options;
using RequestDelegate = Microsoft.AspNetCore.Http.RequestDelegate;

namespace HotChocolate.AspNetCore;

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
internal static class MiddlewareFactory
{
internal static Func<RequestDelegate, RequestDelegate> CreateCancellationMiddleware()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections;
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using HotChocolate.Language;

namespace HotChocolate.AspNetCore.Subscriptions;
Expand All @@ -11,10 +8,6 @@ namespace HotChocolate.AspNetCore.Subscriptions;
/// The operation manager ensures that operation are correctly tracked and cleaned up after they
/// have been completed.
/// </summary>
#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public sealed class OperationManager : IOperationManager
{
private readonly ReaderWriterLockSlim _lock = new();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using HotChocolate.Language;

namespace HotChocolate.AspNetCore.Subscriptions;

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
internal sealed class OperationSession : IOperationSession
{
private readonly CancellationTokenSource _cts = new();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Buffers;
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using HotChocolate.AspNetCore.Subscriptions.Protocols;
using HotChocolate.Transport.Sockets;
using Microsoft.AspNetCore.Http;
Expand All @@ -10,10 +7,6 @@

namespace HotChocolate.AspNetCore.Subscriptions;

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
internal sealed class WebSocketSession : ISocketSession
{
private bool _disposed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ public static RequestFlags DetermineHttpGetRequestFlags(
return requestFlags;
}

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public static async Task<ExecuteRequestResult> ExecuteRequestAsync(
GraphQLRequest request,
RequestFlags flags,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
#if !NET9_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using HotChocolate.AspNetCore.Subscriptions;
using Microsoft.AspNetCore.Http;
using HttpRequestDelegate = Microsoft.AspNetCore.Http.RequestDelegate;

namespace HotChocolate.AspNetCore;

#if !NET9_0_OR_GREATER
[RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
#endif
public sealed class WebSocketSubscriptionMiddleware : MiddlewareBase
{
public WebSocketSubscriptionMiddleware(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using Microsoft.Extensions.DependencyInjection.Extensions;
using HotChocolate.AspNetCore;
Expand Down Expand Up @@ -28,7 +29,8 @@ public static partial class HotChocolateAspNetCoreServiceCollectionExtensions
/// If your <typeparamref name="T"/> needs to access application services you need to
/// make the services available in the schema services via <see cref="RequestExecutorBuilderExtensions.AddApplicationService"/>.
/// </remarks>
public static IRequestExecutorBuilder AddHttpRequestInterceptor<T>(
public static IRequestExecutorBuilder AddHttpRequestInterceptor<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(
this IRequestExecutorBuilder builder)
where T : class, IHttpRequestInterceptor
{
Expand Down Expand Up @@ -191,7 +193,8 @@ public static IRequestExecutorBuilder AddHttpResponseFormatter(
/// <returns>
/// Returns the <see cref="IServiceCollection"/> so that configuration can be chained.
/// </returns>
public static IRequestExecutorBuilder AddHttpResponseFormatter<T>(
public static IRequestExecutorBuilder AddHttpResponseFormatter<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(
this IRequestExecutorBuilder builder)
where T : class, IHttpResponseFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.DependencyInjection.Extensions;
using HotChocolate.AspNetCore;
using HotChocolate.AspNetCore.Formatters;
Expand Down Expand Up @@ -29,7 +30,8 @@ public static partial class HotChocolateAspNetCoreServiceCollectionExtensions
/// If your <typeparamref name="T"/> needs to access application services you need to
/// make the services available in the schema services via <see cref="RequestExecutorBuilderExtensions.AddApplicationService"/>.
/// </remarks>
public static IRequestExecutorBuilder AddSocketSessionInterceptor<T>(
public static IRequestExecutorBuilder AddSocketSessionInterceptor<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(
this IRequestExecutorBuilder builder)
where T : class, ISocketSessionInterceptor =>
builder.ConfigureSchemaServices(s => s
Expand Down Expand Up @@ -109,7 +111,8 @@ private static IRequestExecutorBuilder AddGraphQLOverWebSocketProtocol(
/// <returns>
/// Returns the <see cref="IRequestExecutorBuilder"/> so that configuration can be chained.
/// </returns>
public static IRequestExecutorBuilder AddWebSocketPayloadFormatter<T>(
public static IRequestExecutorBuilder AddWebSocketPayloadFormatter<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(
this IRequestExecutorBuilder builder)
where T : class, IWebSocketPayloadFormatter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>HotChocolate.AspNetCore</AssemblyName>
<RootNamespace>HotChocolate.AspNetCore</RootNamespace>
<Description>This package contains the GraphQL ASP.NET Core middleware for Hot Chocolate. Moreover, this package includes the Nitro middleware, which provides you with our beloved GraphQL IDE middleware.</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/HotChocolate/AzureFunctions/src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\'))" />

<PropertyGroup>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions src/HotChocolate/Caching/src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<PropertyGroup>
<NoWarn>$(NoWarn);CA1812</NoWarn>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using HotChocolate;
using HotChocolate.Authorization;
using HotChocolate.Authorization.Pipeline;
Expand Down Expand Up @@ -88,7 +89,8 @@ public static IRequestExecutorBuilder ModifyAuthorizationOptions(
/// <returns>
/// Returns the <see cref="IRequestExecutorBuilder"/> for chaining in more configurations.
/// </returns>
public static IRequestExecutorBuilder AddAuthorizationHandler<T>(
public static IRequestExecutorBuilder AddAuthorizationHandler<
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(
this IRequestExecutorBuilder builder)
where T : class, IAuthorizationHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<RootNamespace>HotChocolate.Authorization</RootNamespace>
<Description>This package contains the authorization abstractions for Hot Chocolate.</Description>
<NoWarn>HC8001;$(NoWarn)</NoWarn>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/HotChocolate/Core/src/Core/HotChocolate.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<RootNamespace>HotChocolate</RootNamespace>
<Description>Contains the Hot Chocolate GraphQL query execution engine and query validation.</Description>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>HotChocolate.Subscriptions.InMemory</AssemblyName>
<RootNamespace>HotChocolate.Subscriptions.InMemory</RootNamespace>
<Description>Contains an in-memory implementation for a Hot Chocolate GraphQL subscription provider.</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>HotChocolate.Types.CursorPagination.Extensions</AssemblyName>
<RootNamespace>HotChocolate.Types.Pagination</RootNamespace>
<Description>Contains middleware and types for cursor based pagination.</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<AssemblyName>HotChocolate.Types.Json</AssemblyName>
<RootNamespace>HotChocolate.Types</RootNamespace>
<Description>This package provides extensions to deal with Json data.</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>HotChocolate.Types.Mutations</AssemblyName>
<RootNamespace>HotChocolate.Types</RootNamespace>
<Description>This package provides helpers for creating GraphQL mutations.</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<AssemblyName>HotChocolate.Types.NodaTime</AssemblyName>
<RootNamespace>HotChocolate.Types.NodaTime</RootNamespace>
<Description>Adds additional scalars that map to NodaTime runtime types</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<RootNamespace>HotChocolate.Types</RootNamespace>
<Description>This package provides helpers for creating GraphQL queries.</Description>
<NoWarn>HC8001;$(NoWarn)</NoWarn>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>HotChocolate.Types.Scalars.Upload</AssemblyName>
<RootNamespace>HotChocolate.Types</RootNamespace>
<Description>Contains the GraphQL Upload Scalar.</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<AssemblyName>HotChocolate.Types.Scalars</AssemblyName>
<RootNamespace>HotChocolate.Types</RootNamespace>
<Description>Adds additional scalars for better data integrity and validation</Description>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="HotChocolate.CostAnalysis.Tests" />
<InternalsVisibleTo Include="HotChocolate.Fusion" />
Expand Down
Loading
Loading