diff --git a/src/HotChocolate/Adapters/src/Adapters.OpenApi.Core/Execution/DynamicEndpointMiddleware.cs b/src/HotChocolate/Adapters/src/Adapters.OpenApi.Core/Execution/DynamicEndpointMiddleware.cs index 171a9dc5eae..436c6b24970 100644 --- a/src/HotChocolate/Adapters/src/Adapters.OpenApi.Core/Execution/DynamicEndpointMiddleware.cs +++ b/src/HotChocolate/Adapters/src/Adapters.OpenApi.Core/Execution/DynamicEndpointMiddleware.cs @@ -175,7 +175,7 @@ private static async Task BuildVariablesAsync( } var jsonValueParser = new JsonValueParser(buffer: variableBuffer); - var bodyValue = jsonValueParser.Parse(result.Buffer); + var bodyValue = jsonValueParser.Parse(result.Buffer); variables[bodyVariable] = bodyValue; body.AdvanceTo(result.Buffer.End); } diff --git a/src/HotChocolate/Adapters/src/Adapters.OpenApi/OpenApiResultFormatter.cs b/src/HotChocolate/Adapters/src/Adapters.OpenApi/OpenApiResultFormatter.cs index 845fc0d9c30..c21477b11c8 100644 --- a/src/HotChocolate/Adapters/src/Adapters.OpenApi/OpenApiResultFormatter.cs +++ b/src/HotChocolate/Adapters/src/Adapters.OpenApi/OpenApiResultFormatter.cs @@ -1,5 +1,3 @@ -using System.Text.Encodings.Web; -using System.Text.Json; using HotChocolate.Execution; using HotChocolate.Text.Json; using Microsoft.AspNetCore.Http; @@ -8,12 +6,6 @@ namespace HotChocolate.Adapters.OpenApi; internal sealed class OpenApiResultFormatter : IOpenApiResultFormatter { - private static readonly JsonWriterOptions s_jsonWriterOptions = - new() { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping }; - - private static readonly JsonSerializerOptions s_jsonSerializerOptions = - new() { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping }; - public async Task FormatResultAsync( OperationResult operationResult, HttpContext httpContext, diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/PolicyType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/PolicyType.cs index bbafccd6aed..e6aeb5f76cf 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/PolicyType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/PolicyType.cs @@ -3,7 +3,6 @@ using HotChocolate.Features; using HotChocolate.Language; using HotChocolate.Text.Json; -using static HotChocolate.Utilities.ThrowHelper; namespace HotChocolate.ApolloFederation.Types; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs index 267235266a0..6a034d6a1fa 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs @@ -3,7 +3,6 @@ using HotChocolate.Features; using HotChocolate.Language; using HotChocolate.Text.Json; -using static HotChocolate.Utilities.ThrowHelper; namespace HotChocolate.ApolloFederation.Types; diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore.CommandLine/WebApplicationExtensions.cs b/src/HotChocolate/AspNetCore/src/AspNetCore.CommandLine/WebApplicationExtensions.cs index dfc9390f212..5bd11ef3c41 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore.CommandLine/WebApplicationExtensions.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore.CommandLine/WebApplicationExtensions.cs @@ -1,4 +1,3 @@ -using System.CommandLine.Parsing; using HotChocolate.AspNetCore.CommandLine; namespace Microsoft.Extensions.Hosting; diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Subscriptions/WebSocketConnection.cs b/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Subscriptions/WebSocketConnection.cs index f6d0dedd12e..a0d2cdb4645 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Subscriptions/WebSocketConnection.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Subscriptions/WebSocketConnection.cs @@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using static System.Net.WebSockets.WebSocketMessageType; using static HotChocolate.Transport.Sockets.SocketDefaults; using static HotChocolate.Transport.Sockets.WellKnownProtocols; diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/MiddlewareHelper.cs b/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/MiddlewareHelper.cs index 5ea619836e2..d1fb10b3256 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/MiddlewareHelper.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/MiddlewareHelper.cs @@ -234,7 +234,7 @@ await executorSession.OnCreateAsync( } return new ExecuteRequestResult( - OperationResult.FromError([..ex.Errors])); + OperationResult.FromError([.. ex.Errors])); } catch (Exception ex) { @@ -352,7 +352,7 @@ public ParseRequestResult(GraphQLRequest request) public ParseRequestResult(IReadOnlyList errors, HttpStatusCode statusCode) { IsValid = false; - Error = OperationResult.FromError([..errors]); + Error = OperationResult.FromError([.. errors]); StatusCode = statusCode; Request = null; } diff --git a/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpResponse.cs b/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpResponse.cs index 52b73dbf7f4..80ac858282f 100644 --- a/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpResponse.cs +++ b/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpResponse.cs @@ -3,6 +3,7 @@ using System.Net; using System.Net.Http.Headers; using System.IO.Pipelines; +using HotChocolate.Buffers; using HotChocolate.Transport; using HotChocolate.Fusion.Text.Json; #else @@ -10,7 +11,6 @@ using System.Net.Http.Headers; using System.Text.Json; #endif -using HotChocolate.Buffers; #if FUSION namespace HotChocolate.Fusion.Transport.Http; diff --git a/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs b/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs index 966c7c887bd..29b4004cb1e 100644 --- a/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs +++ b/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs @@ -814,7 +814,8 @@ mutation CreateReviewForEpisode( ["ep"] = "JEDI", ["review"] = new Dictionary { - ["stars"] = 5, ["commentary"] = "This is a great movie!" + ["stars"] = 5, + ["commentary"] = "This is a great movie!" } }); @@ -876,7 +877,8 @@ mutation CreateReviewForEpisode( ["ep"] = "JEDI", ["review"] = new Dictionary { - ["stars"] = 5, ["commentary"] = "This is a great movie!" + ["stars"] = 5, + ["commentary"] = "This is a great movie!" } }); @@ -996,7 +998,8 @@ public async Task Post_GraphQL_FileUpload(string? contentType) var request = new GraphQLHttpRequest(operation, requestUri) { - Method = GraphQLHttpMethod.Post, EnableFileUploads = true + Method = GraphQLHttpMethod.Post, + EnableFileUploads = true }; // act @@ -1054,7 +1057,8 @@ public async Task Post_GraphQL_FileUpload_With_ObjectValueNode(string? contentTy var request = new GraphQLHttpRequest(operation, requestUri) { - Method = GraphQLHttpMethod.Post, EnableFileUploads = true + Method = GraphQLHttpMethod.Post, + EnableFileUploads = true }; // act @@ -1093,7 +1097,8 @@ public async Task Post_Subscription_Over_JsonLines() stars } } - """)) { Method = GraphQLHttpMethod.Post, Accept = GraphQLHttpRequest.GraphQLOverHttp }; + """)) + { Method = GraphQLHttpMethod.Post, Accept = GraphQLHttpRequest.GraphQLOverHttp }; var mutationRequest = new OperationRequest( """ @@ -1110,7 +1115,8 @@ mutation CreateReviewForEpisode( ["ep"] = "JEDI", ["review"] = new Dictionary { - ["stars"] = 5, ["commentary"] = "This is a great movie!" + ["stars"] = 5, + ["commentary"] = "This is a great movie!" } }); @@ -1154,7 +1160,7 @@ public async Task ReadAsResult_Application_GraphQL_Response_Json_Response() "application/graphql-response+json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -1182,7 +1188,7 @@ public async Task ReadAsResult_Application_Json_Response() "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -1210,7 +1216,7 @@ public async Task ReadAsResultStream_Single_Application_GraphQL_Response_Json_Re "application/graphql-response+json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -1247,7 +1253,7 @@ public async Task ReadAsResultStream_Single_Application_Json_Response() "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -1286,7 +1292,7 @@ public async Task ReadAsResultStream_Single_Application_Json_Apollo_Request_Batc "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationBatchRequest( + var operationRequest = new OperationBatchRequest( [ new OperationRequest("{ number }") ]); @@ -1333,7 +1339,7 @@ public async Task ReadAsResultStream_Multi_Application_Json_Apollo_Request_Batch "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationBatchRequest( + var operationRequest = new OperationBatchRequest( [ new OperationRequest("{ number }"), new OperationRequest("{ number }") @@ -1375,7 +1381,7 @@ public async Task ReadAsResultStream_Single_Application_Json_Lines_Response() "application/jsonl"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.VariableBatchRequest( + var operationRequest = new VariableBatchRequest( "{ number }", variables: [ @@ -1420,7 +1426,7 @@ public async Task ReadAsResultStream_Multi_Application_Json_Lines_Response() "application/jsonl"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.VariableBatchRequest( + var operationRequest = new VariableBatchRequest( "{ number }", variables: [ @@ -1470,7 +1476,7 @@ public async Task ReadAsResultStream_Single_Text_Event_Stream_Response() "text/event-stream"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -1519,7 +1525,7 @@ public async Task ReadAsResultStream_Multi_Text_Event_Stream_Response() "text/event-stream"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -1552,7 +1558,7 @@ protected override Task SendAsync( HttpRequestMessage request, CancellationToken cancellationToken) { - var response = new HttpResponseMessage(System.Net.HttpStatusCode.OK) + var response = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StreamContent(responseStream) }; diff --git a/src/HotChocolate/Core/src/Execution.Pipeline/ExceptionMiddleware.cs b/src/HotChocolate/Core/src/Execution.Pipeline/ExceptionMiddleware.cs index 93ca9418ca0..3bbee940252 100644 --- a/src/HotChocolate/Core/src/Execution.Pipeline/ExceptionMiddleware.cs +++ b/src/HotChocolate/Core/src/Execution.Pipeline/ExceptionMiddleware.cs @@ -38,7 +38,7 @@ public async ValueTask InvokeAsync(RequestContext context) catch (GraphQLException ex) { var errors = _errorHandler.Handle(ex.Errors); - context.Result = OperationResult.FromError([..errors]); + context.Result = OperationResult.FromError([.. errors]); _diagnosticEvents.RequestError(context, ex); } catch (Exception ex) diff --git a/src/HotChocolate/Core/src/Types.Scalars/EmailAddressType.cs b/src/HotChocolate/Core/src/Types.Scalars/EmailAddressType.cs index bab5f735ec2..77a3fda3b03 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/EmailAddressType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/EmailAddressType.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/HexColorType.cs b/src/HotChocolate/Core/src/Types.Scalars/HexColorType.cs index d5c107ff703..0a2163e6a54 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/HexColorType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/HexColorType.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/HslaType.cs b/src/HotChocolate/Core/src/Types.Scalars/HslaType.cs index f905c14c62b..59678e1a53a 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/HslaType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/HslaType.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/IPv4Type.cs b/src/HotChocolate/Core/src/Types.Scalars/IPv4Type.cs index 17b0b7bff6a..5c272d1377e 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/IPv4Type.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/IPv4Type.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/IPv6Type.cs b/src/HotChocolate/Core/src/Types.Scalars/IPv6Type.cs index de9e3e6b225..4ab66b7ad2b 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/IPv6Type.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/IPv6Type.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/IsbnType.cs b/src/HotChocolate/Core/src/Types.Scalars/IsbnType.cs index 716399efa13..2314a1f1fe4 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/IsbnType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/IsbnType.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/MacAddressType.cs b/src/HotChocolate/Core/src/Types.Scalars/MacAddressType.cs index e5398dc7285..af650069abe 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/MacAddressType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/MacAddressType.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/PhoneNumberType.cs b/src/HotChocolate/Core/src/Types.Scalars/PhoneNumberType.cs index 2ea9b2153ff..0ee9faa2a38 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/PhoneNumberType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/PhoneNumberType.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/RgbType.cs b/src/HotChocolate/Core/src/Types.Scalars/RgbType.cs index 36dc3e8e9a3..486101493bc 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/RgbType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/RgbType.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/RgbaType.cs b/src/HotChocolate/Core/src/Types.Scalars/RgbaType.cs index 554539ecfa2..d18473afe60 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/RgbaType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/RgbaType.cs @@ -1,5 +1,4 @@ using System.Text.RegularExpressions; -using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types.Scalars/UtcOffsetType.cs b/src/HotChocolate/Core/src/Types.Scalars/UtcOffsetType.cs index 7d3852062ec..9f1b95db4ba 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/UtcOffsetType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/UtcOffsetType.cs @@ -142,7 +142,7 @@ public static bool TrySerialize( [NotNullWhen(true)] out string? result) => s_timeSpanToOffset.TryGetValue(value, out result); - public static bool TryDeserialize( string value, out TimeSpan result) + public static bool TryDeserialize(string value, out TimeSpan result) => s_offsetToTimeSpan.TryGetValue(value, out result); } } diff --git a/src/HotChocolate/Core/src/Types/Execution/Configuration/DefaultRequestExecutorBuilder.cs b/src/HotChocolate/Core/src/Types/Execution/Configuration/DefaultRequestExecutorBuilder.cs index cdf56468163..a16f552eb44 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Configuration/DefaultRequestExecutorBuilder.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Configuration/DefaultRequestExecutorBuilder.cs @@ -1,5 +1,3 @@ -using Microsoft.Extensions.DependencyInjection; - namespace HotChocolate.Execution.Configuration; internal class DefaultRequestExecutorBuilder : IRequestExecutorBuilder diff --git a/src/HotChocolate/Core/src/Types/Execution/Configuration/OnConfigureSchemaServices.cs b/src/HotChocolate/Core/src/Types/Execution/Configuration/OnConfigureSchemaServices.cs index f93fb01e059..3fb3cb28022 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Configuration/OnConfigureSchemaServices.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Configuration/OnConfigureSchemaServices.cs @@ -1,5 +1,3 @@ -using Microsoft.Extensions.DependencyInjection; - namespace HotChocolate.Execution.Configuration; public delegate void OnConfigureSchemaServices( diff --git a/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/InternalSchemaServiceCollectionExtensions.cs b/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/InternalSchemaServiceCollectionExtensions.cs index 57839a3b016..d6716c39838 100644 --- a/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/InternalSchemaServiceCollectionExtensions.cs +++ b/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/InternalSchemaServiceCollectionExtensions.cs @@ -1,4 +1,3 @@ -using HotChocolate; using HotChocolate.Execution; using HotChocolate.Execution.Instrumentation; using HotChocolate.Execution.Processing; diff --git a/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.ErrorFilter.cs b/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.ErrorFilter.cs index 898abc1dfe2..ab0b682a561 100644 --- a/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.ErrorFilter.cs +++ b/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.ErrorFilter.cs @@ -52,7 +52,7 @@ public static IRequestExecutorBuilder AddErrorFilter( /// The passed to the /// is for the schema services. If you need to access application services /// you need to either make the services available in the schema services - /// via or use + /// via or use /// /// to access the application services from within the schema service provider. /// @@ -83,7 +83,7 @@ public static IRequestExecutorBuilder AddErrorFilter( /// /// The will be activated with the of the schema services. /// If your needs to access application services you need to - /// make the services available in the schema services via . + /// make the services available in the schema services via . /// public static IRequestExecutorBuilder AddErrorFilter( this IRequestExecutorBuilder builder) diff --git a/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.Optimizer.cs b/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.Optimizer.cs index 525a65c1c45..314b686191e 100644 --- a/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.Optimizer.cs +++ b/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.Optimizer.cs @@ -21,7 +21,7 @@ public static partial class RequestExecutorBuilderExtensions /// /// The will be activated with the of the schema services. /// If your needs to access application services you need to - /// make the services available in the schema services via . + /// make the services available in the schema services via . /// public static IRequestExecutorBuilder AddOperationCompilerOptimizer( this IRequestExecutorBuilder builder) @@ -52,7 +52,7 @@ public static IRequestExecutorBuilder AddOperationCompilerOptimizer( /// The passed to the /// is for the schema services. If you need to access application services /// you need to either make the services available in the schema services - /// via or use + /// via or use /// /// to access the application services from within the schema service provider. /// diff --git a/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.TransactionScope.cs b/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.TransactionScope.cs index 2215856cd79..230f155b4d3 100644 --- a/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.TransactionScope.cs +++ b/src/HotChocolate/Core/src/Types/Execution/DependencyInjection/RequestExecutorBuilderExtensions.TransactionScope.cs @@ -25,7 +25,7 @@ public static partial class RequestExecutorBuilderExtensions /// /// The will be activated with the of the schema services. /// If your needs to access application services you need to - /// make the services available in the schema services via . + /// make the services available in the schema services via . /// public static IRequestExecutorBuilder AddTransactionScopeHandler( this IRequestExecutorBuilder builder) @@ -62,7 +62,7 @@ public static IRequestExecutorBuilder AddTransactionScopeHandler( /// The passed to the /// is for the schema services. If you need to access application services /// you need to either make the services available in the schema services - /// via or use + /// via or use /// /// to access the application services from within the schema service provider. /// diff --git a/src/HotChocolate/Core/src/Types/Execution/Extensions/OperationContextExtensions.cs b/src/HotChocolate/Core/src/Types/Execution/Extensions/OperationContextExtensions.cs index 45648bc5387..cc1695ed41b 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Extensions/OperationContextExtensions.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Extensions/OperationContextExtensions.cs @@ -1,5 +1,4 @@ using HotChocolate.Execution.Processing; -using HotChocolate.Properties; // ReSharper disable once CheckNamespace namespace HotChocolate.Execution; diff --git a/src/HotChocolate/Core/src/Types/Execution/Instrumentation/AggregateExecutionDiagnosticEvents.cs b/src/HotChocolate/Core/src/Types/Execution/Instrumentation/AggregateExecutionDiagnosticEvents.cs index 357ef837987..6b7d1a7c81e 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Instrumentation/AggregateExecutionDiagnosticEvents.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Instrumentation/AggregateExecutionDiagnosticEvents.cs @@ -1,4 +1,3 @@ -using HotChocolate.Execution.Processing; using HotChocolate.Language; using HotChocolate.Resolvers; diff --git a/src/HotChocolate/Core/src/Types/Execution/Instrumentation/ExecutionDiagnosticEventListener.cs b/src/HotChocolate/Core/src/Types/Execution/Instrumentation/ExecutionDiagnosticEventListener.cs index 87ebbd4f4c6..8ac96d26495 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Instrumentation/ExecutionDiagnosticEventListener.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Instrumentation/ExecutionDiagnosticEventListener.cs @@ -1,4 +1,3 @@ -using HotChocolate.Execution.Processing; using HotChocolate.Language; using HotChocolate.Resolvers; diff --git a/src/HotChocolate/Core/src/Types/Execution/Instrumentation/IExecutionDiagnosticEvents.cs b/src/HotChocolate/Core/src/Types/Execution/Instrumentation/IExecutionDiagnosticEvents.cs index 9adf6f0dae8..c5082be738b 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Instrumentation/IExecutionDiagnosticEvents.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Instrumentation/IExecutionDiagnosticEvents.cs @@ -1,4 +1,3 @@ -using HotChocolate.Execution.Processing; using HotChocolate.Resolvers; namespace HotChocolate.Execution.Instrumentation; diff --git a/src/HotChocolate/Core/src/Types/Execution/Pipeline/OperationVariableCoercionMiddleware.cs b/src/HotChocolate/Core/src/Types/Execution/Pipeline/OperationVariableCoercionMiddleware.cs index 8673ab06f6c..0e519fc9c19 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Pipeline/OperationVariableCoercionMiddleware.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Pipeline/OperationVariableCoercionMiddleware.cs @@ -1,6 +1,5 @@ using HotChocolate.Execution.Instrumentation; using HotChocolate.Execution.Processing; -using Microsoft.Extensions.DependencyInjection; using static HotChocolate.Execution.Pipeline.PipelineTools; namespace HotChocolate.Execution.Pipeline; diff --git a/src/HotChocolate/Core/src/Types/Execution/Pipeline/RequestClassMiddlewareFactory.cs b/src/HotChocolate/Core/src/Types/Execution/Pipeline/RequestClassMiddlewareFactory.cs index 11071d39742..852c038650e 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Pipeline/RequestClassMiddlewareFactory.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Pipeline/RequestClassMiddlewareFactory.cs @@ -6,7 +6,6 @@ using HotChocolate.PersistedOperations; using HotChocolate.Utilities; using HotChocolate.Validation; -using Microsoft.Extensions.DependencyInjection; namespace HotChocolate.Execution.Pipeline; diff --git a/src/HotChocolate/Core/src/Types/Execution/Pipeline/TimeoutMiddleware.cs b/src/HotChocolate/Core/src/Types/Execution/Pipeline/TimeoutMiddleware.cs index b6159b64dc4..5c2627c28b4 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Pipeline/TimeoutMiddleware.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Pipeline/TimeoutMiddleware.cs @@ -1,6 +1,5 @@ using System.Diagnostics; using HotChocolate.Execution.Options; -using Microsoft.Extensions.DependencyInjection; using static System.Threading.CancellationTokenSource; namespace HotChocolate.Execution.Pipeline; diff --git a/src/HotChocolate/Core/src/Types/Execution/Processing/ArgumentMap.cs b/src/HotChocolate/Core/src/Types/Execution/Processing/ArgumentMap.cs index 118c9dbd800..342ec283e38 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Processing/ArgumentMap.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Processing/ArgumentMap.cs @@ -2,7 +2,6 @@ using System.Collections.Frozen; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; using HotChocolate.Resolvers; namespace HotChocolate.Execution.Processing; diff --git a/src/HotChocolate/Core/src/Types/Execution/Processing/DefaultActivator.cs b/src/HotChocolate/Core/src/Types/Execution/Processing/DefaultActivator.cs index 9be33379eba..a791ea14d8b 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Processing/DefaultActivator.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Processing/DefaultActivator.cs @@ -1,5 +1,4 @@ using System.Collections.Concurrent; -using Microsoft.Extensions.DependencyInjection; namespace HotChocolate.Execution.Processing; diff --git a/src/HotChocolate/Core/src/Types/Execution/Processing/OperationCompilerOptimizers.cs b/src/HotChocolate/Core/src/Types/Execution/Processing/OperationCompilerOptimizers.cs index 855c089dfd4..ff621623103 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Processing/OperationCompilerOptimizers.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Processing/OperationCompilerOptimizers.cs @@ -1,6 +1,4 @@ using System.Collections.Immutable; -using HotChocolate.Language; -using HotChocolate.Types; namespace HotChocolate.Execution.Processing; diff --git a/src/HotChocolate/Core/src/Types/Execution/Processing/OperationFeatureCollection.cs b/src/HotChocolate/Core/src/Types/Execution/Processing/OperationFeatureCollection.cs index dfbf1426fb2..88393e44ff8 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Processing/OperationFeatureCollection.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Processing/OperationFeatureCollection.cs @@ -88,7 +88,7 @@ public object? this[Type key] } public TFeature GetOrSetSafe() where TFeature : new() - => GetOrSetSafe(static () => new TFeature()); + => GetOrSetSafe(static () => new TFeature()); public TFeature GetOrSetSafe(Func factory) { diff --git a/src/HotChocolate/Core/src/Types/Execution/Processing/OperationOptimizerContext.cs b/src/HotChocolate/Core/src/Types/Execution/Processing/OperationOptimizerContext.cs index c2f721a968a..5e2cb9ab3ec 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Processing/OperationOptimizerContext.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Processing/OperationOptimizerContext.cs @@ -1,7 +1,3 @@ -using HotChocolate.Language; -using HotChocolate.Resolvers; -using HotChocolate.Types; - namespace HotChocolate.Execution.Processing; /// diff --git a/src/HotChocolate/Core/src/Types/Execution/Processing/SubscriptionExecutor.cs b/src/HotChocolate/Core/src/Types/Execution/Processing/SubscriptionExecutor.cs index d7fa734c545..88ea444de11 100644 --- a/src/HotChocolate/Core/src/Types/Execution/Processing/SubscriptionExecutor.cs +++ b/src/HotChocolate/Core/src/Types/Execution/Processing/SubscriptionExecutor.cs @@ -73,7 +73,7 @@ public async Task ExecuteAsync( await subscription.DisposeAsync().ConfigureAwait(false); } - return new OperationResult([..ex.Errors]); + return new OperationResult([.. ex.Errors]); } catch (Exception ex) { @@ -91,7 +91,7 @@ static ImmutableList Unwrap(IError error) { if (error is AggregateError aggregateError) { - return [..aggregateError.Errors]; + return [.. aggregateError.Errors]; } return [error]; diff --git a/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.Hooks.cs b/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.Hooks.cs index de361d3469f..774f8e1d94e 100644 --- a/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.Hooks.cs +++ b/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.Hooks.cs @@ -1,6 +1,5 @@ using HotChocolate.Execution.Configuration; using HotChocolate.Execution.Options; -using Microsoft.Extensions.DependencyInjection; namespace HotChocolate.Execution; diff --git a/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.Warmup.cs b/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.Warmup.cs index 4fa032c723a..a22c479baa2 100644 --- a/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.Warmup.cs +++ b/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.Warmup.cs @@ -1,5 +1,3 @@ -using Microsoft.Extensions.DependencyInjection; - namespace HotChocolate.Execution; internal sealed partial class RequestExecutorManager diff --git a/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.cs b/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.cs index 56e873af829..6eedd236801 100644 --- a/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.cs +++ b/src/HotChocolate/Core/src/Types/Execution/RequestExecutorManager.cs @@ -15,7 +15,6 @@ using HotChocolate.Types.Descriptors.Configurations; using HotChocolate.Utilities; using HotChocolate.Validation; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.ObjectPool; using Microsoft.Extensions.Options; @@ -268,7 +267,7 @@ await typeModuleChangeMonitor.ConfigureAsync(context, cancellationToken) serviceCollection.AddSingleton(new SchemaVersionInfo(version)); - serviceCollection.AddSingleton( + serviceCollection.AddSingleton( _ => context.DescriptorContext.TypeConverter); serviceCollection.AddSingleton( diff --git a/src/HotChocolate/Core/src/Types/Fetching/DataLoaderRootFieldTypeInterceptor.cs b/src/HotChocolate/Core/src/Types/Fetching/DataLoaderRootFieldTypeInterceptor.cs index 257d9735ce7..f0b9500887d 100644 --- a/src/HotChocolate/Core/src/Types/Fetching/DataLoaderRootFieldTypeInterceptor.cs +++ b/src/HotChocolate/Core/src/Types/Fetching/DataLoaderRootFieldTypeInterceptor.cs @@ -6,7 +6,6 @@ using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Configurations; using HotChocolate.Types.Pagination; -using Microsoft.Extensions.DependencyInjection; namespace HotChocolate.Fetching; diff --git a/src/HotChocolate/Core/src/Types/Fetching/DataLoaderScopeHolder.cs b/src/HotChocolate/Core/src/Types/Fetching/DataLoaderScopeHolder.cs index b6492101b65..a7d9aba02d8 100644 --- a/src/HotChocolate/Core/src/Types/Fetching/DataLoaderScopeHolder.cs +++ b/src/HotChocolate/Core/src/Types/Fetching/DataLoaderScopeHolder.cs @@ -1,6 +1,5 @@ using GreenDonut; using GreenDonut.DependencyInjection; -using Microsoft.Extensions.DependencyInjection; namespace HotChocolate.Fetching; diff --git a/src/HotChocolate/Core/src/Types/Fetching/ExecutionDataLoaderScopeFactory.cs b/src/HotChocolate/Core/src/Types/Fetching/ExecutionDataLoaderScopeFactory.cs index 853147d5507..55976059d3f 100644 --- a/src/HotChocolate/Core/src/Types/Fetching/ExecutionDataLoaderScopeFactory.cs +++ b/src/HotChocolate/Core/src/Types/Fetching/ExecutionDataLoaderScopeFactory.cs @@ -1,6 +1,5 @@ using GreenDonut; using GreenDonut.DependencyInjection; -using Microsoft.Extensions.DependencyInjection; namespace HotChocolate.Fetching; diff --git a/src/HotChocolate/Core/src/Types/Fetching/Extensions/DataLoaderResolverContextExtensions.cs b/src/HotChocolate/Core/src/Types/Fetching/Extensions/DataLoaderResolverContextExtensions.cs index b2487a09c38..5b9b1eb93a2 100644 --- a/src/HotChocolate/Core/src/Types/Fetching/Extensions/DataLoaderResolverContextExtensions.cs +++ b/src/HotChocolate/Core/src/Types/Fetching/Extensions/DataLoaderResolverContextExtensions.cs @@ -1,7 +1,6 @@ using GreenDonut; using GreenDonut.DependencyInjection; using HotChocolate.Resolvers; -using Microsoft.Extensions.DependencyInjection; // ReSharper disable once CheckNamespace namespace HotChocolate.Types; diff --git a/src/HotChocolate/Core/src/Types/Fetching/Extensions/DataLoaderServiceProviderExtensions.cs b/src/HotChocolate/Core/src/Types/Fetching/Extensions/DataLoaderServiceProviderExtensions.cs index 76ae3f391e1..b620005376b 100644 --- a/src/HotChocolate/Core/src/Types/Fetching/Extensions/DataLoaderServiceProviderExtensions.cs +++ b/src/HotChocolate/Core/src/Types/Fetching/Extensions/DataLoaderServiceProviderExtensions.cs @@ -1,5 +1,3 @@ -using Microsoft.Extensions.DependencyInjection; - namespace HotChocolate.Fetching; internal static class DataLoaderServiceProviderExtensions diff --git a/src/HotChocolate/Core/src/Types/Resolvers/SelectionEnumerator.cs b/src/HotChocolate/Core/src/Types/Resolvers/SelectionEnumerator.cs index 23347abd46b..016bcde9a46 100644 --- a/src/HotChocolate/Core/src/Types/Resolvers/SelectionEnumerator.cs +++ b/src/HotChocolate/Core/src/Types/Resolvers/SelectionEnumerator.cs @@ -80,7 +80,7 @@ public void Reset() IEnumerator IEnumerable.GetEnumerator() => this; - IEnumerator IEnumerable.GetEnumerator() => this; + IEnumerator IEnumerable.GetEnumerator() => this; public void Dispose() { } } diff --git a/src/HotChocolate/Core/src/Types/Types/Scalars/FloatTypeBase.cs b/src/HotChocolate/Core/src/Types/Types/Scalars/FloatTypeBase.cs index 3975fd4d7d0..22c909ab640 100644 --- a/src/HotChocolate/Core/src/Types/Types/Scalars/FloatTypeBase.cs +++ b/src/HotChocolate/Core/src/Types/Types/Scalars/FloatTypeBase.cs @@ -1,7 +1,6 @@ using System.Text.Json; using HotChocolate.Features; using HotChocolate.Language; -using HotChocolate.Properties; using HotChocolate.Text.Json; using static HotChocolate.Utilities.ThrowHelper; diff --git a/src/HotChocolate/Core/src/Types/Types/Scalars/ScalarType.cs b/src/HotChocolate/Core/src/Types/Types/Scalars/ScalarType.cs index 3825c3c22ab..43e768d69cd 100644 --- a/src/HotChocolate/Core/src/Types/Types/Scalars/ScalarType.cs +++ b/src/HotChocolate/Core/src/Types/Types/Scalars/ScalarType.cs @@ -1,4 +1,3 @@ -using System.Diagnostics.CodeAnalysis; using System.Text.Json; using HotChocolate.Features; using HotChocolate.Language; diff --git a/src/HotChocolate/Core/src/Validation/Rules/OverlappingFieldsCanBeMergedRule.cs b/src/HotChocolate/Core/src/Validation/Rules/OverlappingFieldsCanBeMergedRule.cs index b40b3b7391c..6259b7d08ef 100644 --- a/src/HotChocolate/Core/src/Validation/Rules/OverlappingFieldsCanBeMergedRule.cs +++ b/src/HotChocolate/Core/src/Validation/Rules/OverlappingFieldsCanBeMergedRule.cs @@ -1,7 +1,6 @@ using System.Diagnostics.CodeAnalysis; using HotChocolate.Language; using HotChocolate.Types; -using Microsoft.Extensions.ObjectPool; namespace HotChocolate.Validation.Rules; diff --git a/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/Query.cs b/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/Query.cs index 1d886d10930..577b96dcd57 100644 --- a/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/Query.cs +++ b/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/Query.cs @@ -1,5 +1,4 @@ using GreenDonut; -using HotChocolate.Language; namespace HotChocolate.Execution.Integration.DataLoader; diff --git a/src/HotChocolate/Core/test/Execution.Tests/Processing/VisibilityTests.cs b/src/HotChocolate/Core/test/Execution.Tests/Processing/VisibilityTests.cs index 65fe8bb49c8..9089e3c7298 100644 --- a/src/HotChocolate/Core/test/Execution.Tests/Processing/VisibilityTests.cs +++ b/src/HotChocolate/Core/test/Execution.Tests/Processing/VisibilityTests.cs @@ -1,6 +1,5 @@ using System.Collections; using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; using HotChocolate.Language; using Moq; diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/AnyTypeTests.cs b/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/AnyTypeTests.cs index 7bff3ac0d76..e995e31736d 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/AnyTypeTests.cs +++ b/src/HotChocolate/Core/test/Types.Tests/Types/Scalars/AnyTypeTests.cs @@ -1390,7 +1390,7 @@ public async Task CoerceInputLiteral_StringValueNode() var value = type.CoerceInputLiteral(new StringValueNode("Foo")); // assert - Assert.Equal("Foo", Assert.IsType(value).GetString()); + Assert.Equal("Foo", Assert.IsType(value).GetString()); } [Fact] diff --git a/src/HotChocolate/Data/src/Data/Filters/Extensions/HotChocolateDataQueryableExtensions.cs b/src/HotChocolate/Data/src/Data/Filters/Extensions/HotChocolateDataQueryableExtensions.cs index 7d7fb6188ab..08bebc764a7 100644 --- a/src/HotChocolate/Data/src/Data/Filters/Extensions/HotChocolateDataQueryableExtensions.cs +++ b/src/HotChocolate/Data/src/Data/Filters/Extensions/HotChocolateDataQueryableExtensions.cs @@ -1,6 +1,5 @@ using HotChocolate.Data.Filters; using HotChocolate.Data.Sorting; -using HotChocolate.Execution; using HotChocolate.Execution.Processing; // ReSharper disable once CheckNamespace diff --git a/src/HotChocolate/Data/src/Data/Projections/Context/SelectedField.cs b/src/HotChocolate/Data/src/Data/Projections/Context/SelectedField.cs index 825c0c0db55..a8772dd588d 100644 --- a/src/HotChocolate/Data/src/Data/Projections/Context/SelectedField.cs +++ b/src/HotChocolate/Data/src/Data/Projections/Context/SelectedField.cs @@ -1,4 +1,3 @@ -using HotChocolate.Execution; using HotChocolate.Execution.Processing; using HotChocolate.Resolvers; using HotChocolate.Types; diff --git a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/Types/Brands/BrandNode.cs b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/Types/Brands/BrandNode.cs index 122ef0ab407..a7c6af3f923 100644 --- a/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/Types/Brands/BrandNode.cs +++ b/src/HotChocolate/Data/test/Data.PostgreSQL.Tests/Types/Brands/BrandNode.cs @@ -2,7 +2,6 @@ using HotChocolate.Data.Models; using HotChocolate.Data.Services; using HotChocolate.Execution; -using HotChocolate.Execution.Processing; using HotChocolate.Types; using HotChocolate.Types.Pagination; diff --git a/src/HotChocolate/Diagnostics/src/Diagnostics/Listeners/ActivityExecutionDiagnosticListener.cs b/src/HotChocolate/Diagnostics/src/Diagnostics/Listeners/ActivityExecutionDiagnosticListener.cs index 38bd3ee8b7b..e9450965209 100644 --- a/src/HotChocolate/Diagnostics/src/Diagnostics/Listeners/ActivityExecutionDiagnosticListener.cs +++ b/src/HotChocolate/Diagnostics/src/Diagnostics/Listeners/ActivityExecutionDiagnosticListener.cs @@ -2,7 +2,6 @@ using HotChocolate.Diagnostics.Scopes; using HotChocolate.Execution; using HotChocolate.Execution.Instrumentation; -using HotChocolate.Execution.Processing; using HotChocolate.Resolvers; using Microsoft.AspNetCore.Http; using OpenTelemetry.Trace; diff --git a/src/HotChocolate/Fusion-vnext/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs b/src/HotChocolate/Fusion-vnext/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs index 581d0fc787f..9644e202b3e 100644 --- a/src/HotChocolate/Fusion-vnext/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs +++ b/src/HotChocolate/Fusion-vnext/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs @@ -9,7 +9,6 @@ using System; using System.Net.Http; using System.Threading.Tasks; -using HotChocolate.Fusion.Text.Json; using BenchmarkDotNet.Configs; using BenchmarkDotNet.Columns; using BenchmarkDotNet.Exporters.Csv; diff --git a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution.Types/ThrowHelper.cs b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution.Types/ThrowHelper.cs index 7df9b4462f2..e019e74611f 100644 --- a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution.Types/ThrowHelper.cs +++ b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution.Types/ThrowHelper.cs @@ -1,5 +1,3 @@ -using System.Diagnostics.CodeAnalysis; - namespace HotChocolate.Fusion.Types; internal static class ThrowHelper diff --git a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs index ea357df106f..8da1f9d4d10 100644 --- a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs +++ b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs @@ -1,5 +1,4 @@ using System.Collections.Immutable; -using System.Net.Http.Headers; using System.Runtime.CompilerServices; using System.Text.Json; using HotChocolate.Fusion.Execution.Nodes; diff --git a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/OperationPlanContext.cs b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/OperationPlanContext.cs index c7e9e90a740..017bf11c082 100644 --- a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/OperationPlanContext.cs +++ b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/OperationPlanContext.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using HotChocolate.Buffers; -using HotChocolate.Collections.Immutable; using HotChocolate.Execution; using HotChocolate.Features; using HotChocolate.Fusion.Diagnostics; diff --git a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/CompositeResultDocument.cs b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/CompositeResultDocument.cs index a41a9359ef8..b89108b3adb 100644 --- a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/CompositeResultDocument.cs +++ b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/CompositeResultDocument.cs @@ -1,7 +1,6 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Text; -using System.Text.Json; using HotChocolate.Fusion.Execution.Nodes; using HotChocolate.Text.Json; using HotChocolate.Types; diff --git a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/SourceResultDocument.cs b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/SourceResultDocument.cs index cea12bdb41b..dff90f32564 100644 --- a/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/SourceResultDocument.cs +++ b/src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Text/Json/SourceResultDocument.cs @@ -3,7 +3,6 @@ using System.Text; using System.Text.Json; using HotChocolate.Buffers; -using HotChocolate.Text.Json; namespace HotChocolate.Fusion.Text.Json; diff --git a/src/HotChocolate/Fusion-vnext/src/Fusion.Utilities/Rewriters/InlineFragmentOperationRewriter.cs b/src/HotChocolate/Fusion-vnext/src/Fusion.Utilities/Rewriters/InlineFragmentOperationRewriter.cs index 65633c5f48f..7c95b57d7d2 100644 --- a/src/HotChocolate/Fusion-vnext/src/Fusion.Utilities/Rewriters/InlineFragmentOperationRewriter.cs +++ b/src/HotChocolate/Fusion-vnext/src/Fusion.Utilities/Rewriters/InlineFragmentOperationRewriter.cs @@ -570,7 +570,7 @@ private static IReadOnlyList RemoveStaticIncludeConditions( static bool IsStaticIncludeCondition(DirectiveNode directive, ref bool skipChecked, ref bool includeChecked) { - if(directive.Name.Value.Equals(DirectiveNames.Skip.Name, StringComparison.Ordinal)) + if (directive.Name.Value.Equals(DirectiveNames.Skip.Name, StringComparison.Ordinal)) { skipChecked = true; if (directive.Arguments is [{ Value: BooleanValueNode }]) @@ -578,7 +578,7 @@ static bool IsStaticIncludeCondition(DirectiveNode directive, ref bool skipCheck return true; } } - else if(directive.Name.Value.Equals(DirectiveNames.Include.Name, StringComparison.Ordinal)) + else if (directive.Name.Value.Equals(DirectiveNames.Include.Name, StringComparison.Ordinal)) { includeChecked = true; if (directive.Arguments is [{ Value: BooleanValueNode }]) diff --git a/src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/FusionTestBase.cs b/src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/FusionTestBase.cs index 7bc69ff2f97..2effdcdadf7 100644 --- a/src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/FusionTestBase.cs +++ b/src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/FusionTestBase.cs @@ -85,7 +85,8 @@ protected async Task CreateCompositeSchemaAsync( GetSourceSchemaInteraction(context, node).Request = new SourceSchemaInteraction.RawSourceSchemaRequest { - Body = bodyStream, ContentType = contentType + Body = bodyStream, + ContentType = contentType }; }, onAfterReceive: (context, node, response) => diff --git a/src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/LookupTests.cs b/src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/LookupTests.cs index 5906fc0a4e9..3dcb50b1617 100644 --- a/src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/LookupTests.cs +++ b/src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/LookupTests.cs @@ -400,7 +400,7 @@ type Author { await MatchSnapshotAsync(gateway, request, result); } - [Fact] + [Fact] public async Task Fetch_With_Request_Batching_JsonArray_Large_Response() { // arrange @@ -408,7 +408,7 @@ public async Task Fetch_With_Request_Batching_JsonArray_Large_Response() "a", b => b.AddQueryType()); - string jsonArrayResponse = + var jsonArrayResponse = $$""" [ { @@ -631,7 +631,7 @@ private static string GenerateRandomString(int kiloBytes) var random = new Random(0); var stringBuilder = new StringBuilder(charsNeeded); - for (int i = 0; i < charsNeeded; i++) + for (var i = 0; i < charsNeeded; i++) { stringBuilder.Append(chars[random.Next(chars.Length)]); } @@ -647,7 +647,7 @@ protected override Task SendAsync( { var response = new HttpResponseMessage(HttpStatusCode.OK) { - Content = new StringContent(responseContent, System.Text.Encoding.UTF8, "application/json") + Content = new StringContent(responseContent, Encoding.UTF8, "application/json") }; return Task.FromResult(response); } diff --git a/src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Execution/FusionRequestExecutorManagerTests.cs b/src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Execution/FusionRequestExecutorManagerTests.cs index 253bb0e92c1..d085eb34e35 100644 --- a/src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Execution/FusionRequestExecutorManagerTests.cs +++ b/src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Execution/FusionRequestExecutorManagerTests.cs @@ -1,4 +1,3 @@ -using System.Collections.Immutable; using HotChocolate.Collections.Immutable; using HotChocolate.Execution; using HotChocolate.Fusion.Configuration; diff --git a/src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs b/src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs index 8a57aebe217..606c6207674 100644 --- a/src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs +++ b/src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs @@ -14,7 +14,7 @@ public async Task Fetch_Large_Json() await using var app = context.Item2; using var client = new DefaultGraphQLHttpClient(server.CreateClient(), disposeInnerClient: true); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ items }"); + var operationRequest = new OperationRequest("{ items }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -43,7 +43,7 @@ public async Task ReadAsResult_Application_GraphQL_Response_Json_Response() "application/graphql-response+json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -71,7 +71,7 @@ public async Task ReadAsResult_Application_Json_Response() "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -99,7 +99,7 @@ public async Task ReadAsResultStream_Single_Application_GraphQL_Response_Json_Re "application/graphql-response+json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -136,7 +136,7 @@ public async Task ReadAsResultStream_Single_Application_Json_Response() "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -175,7 +175,7 @@ public async Task ReadAsResultStream_Single_Application_Json_Apollo_Request_Batc "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationBatchRequest( + var operationRequest = new OperationBatchRequest( [ new OperationRequest("{ number }") ]); @@ -222,7 +222,7 @@ public async Task ReadAsResultStream_Multi_Application_Json_Apollo_Request_Batch "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationBatchRequest( + var operationRequest = new OperationBatchRequest( [ new OperationRequest("{ number }"), new OperationRequest("{ number }") @@ -264,7 +264,7 @@ public async Task ReadAsResultStream_Single_Application_Json_Lines_Response() "application/jsonl"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.VariableBatchRequest( + var operationRequest = new VariableBatchRequest( "{ number }", variables: [ new Dictionary() @@ -308,7 +308,7 @@ public async Task ReadAsResultStream_Multi_Application_Json_Lines_Response() "application/jsonl"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.VariableBatchRequest( + var operationRequest = new VariableBatchRequest( "{ number }", variables: [ new Dictionary(), @@ -357,7 +357,7 @@ public async Task ReadAsResultStream_Single_Text_Event_Stream_Response() "text/event-stream"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -406,7 +406,7 @@ public async Task ReadAsResultStream_Multi_Text_Event_Stream_Response() "text/event-stream"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new HotChocolate.Transport.OperationRequest("{ number }"); + var operationRequest = new OperationRequest("{ number }"); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act diff --git a/src/HotChocolate/Language/src/Language.Web/Utf8GraphQLSocketMessageParser.cs b/src/HotChocolate/Language/src/Language.Web/Utf8GraphQLSocketMessageParser.cs index f2f05069e31..47476124670 100644 --- a/src/HotChocolate/Language/src/Language.Web/Utf8GraphQLSocketMessageParser.cs +++ b/src/HotChocolate/Language/src/Language.Web/Utf8GraphQLSocketMessageParser.cs @@ -2,7 +2,7 @@ namespace HotChocolate.Language; -public ref struct Utf8GraphQLSocketMessageParser +public readonly ref struct Utf8GraphQLSocketMessageParser { private static readonly JsonReaderOptions s_jsonOptions = new() { diff --git a/src/HotChocolate/Language/test/Language.Tests/Parser/QueryParserTests.cs b/src/HotChocolate/Language/test/Language.Tests/Parser/QueryParserTests.cs index e513837a1f2..05ceb25a64c 100644 --- a/src/HotChocolate/Language/test/Language.Tests/Parser/QueryParserTests.cs +++ b/src/HotChocolate/Language/test/Language.Tests/Parser/QueryParserTests.cs @@ -232,7 +232,7 @@ public void IntrospectionQuery() var document = parser.Parse(); // assert - document.ToString().MatchSnapshot(extension: ".graphql");; + document.ToString().MatchSnapshot(extension: ".graphql"); } [Fact] @@ -249,7 +249,7 @@ public void KitchenSinkQueryQuery() var document = parser.Parse(); // assert - document.ToString().MatchSnapshot(extension: ".graphql");; + document.ToString().MatchSnapshot(extension: ".graphql"); } [Fact] @@ -478,7 +478,7 @@ public void RussianLiterals() var document = parser.Parse(); // assert - document.ToString().MatchSnapshot(extension: ".graphql");; + document.ToString().MatchSnapshot(extension: ".graphql"); } [Fact(Skip = "Implement Parse Variable Directives")] @@ -493,6 +493,6 @@ public void ParseVariablesWithDirective() var document = parser.Parse(); // assert - document.ToString().MatchSnapshot(extension: ".graphql");; + document.ToString().MatchSnapshot(extension: ".graphql"); } } diff --git a/src/HotChocolate/MongoDb/src/Types/BsonType.cs b/src/HotChocolate/MongoDb/src/Types/BsonType.cs index 009ef249fad..8aed6ac3bd9 100644 --- a/src/HotChocolate/MongoDb/src/Types/BsonType.cs +++ b/src/HotChocolate/MongoDb/src/Types/BsonType.cs @@ -1,4 +1,3 @@ -using System.Collections; using System.Globalization; using System.Text.Json; using HotChocolate.Features; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/ProjectionVisitorTestBase.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/ProjectionVisitorTestBase.cs index e7896ad2ad3..9eccb517e09 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/ProjectionVisitorTestBase.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/ProjectionVisitorTestBase.cs @@ -17,7 +17,7 @@ private Func> BuildResolver( mongoResource.CreateCollection("data_" + Guid.NewGuid().ToString("N")); collection.InsertMany(results); - + return _ => collection.AsExecutable(); } diff --git a/src/HotChocolate/Primitives/src/Primitives/Types/IntrospectionTypeNames.cs b/src/HotChocolate/Primitives/src/Primitives/Types/IntrospectionTypeNames.cs index 9057e806224..037e1bff792 100644 --- a/src/HotChocolate/Primitives/src/Primitives/Types/IntrospectionTypeNames.cs +++ b/src/HotChocolate/Primitives/src/Primitives/Types/IntrospectionTypeNames.cs @@ -2,6 +2,7 @@ namespace HotChocolate.Types; public static class IntrospectionTypeNames { +#pragma warning disable IDE1006 // Naming Styles // ReSharper disable InconsistentNaming public const string __Directive = nameof(__Directive); public const string __DirectiveLocation = nameof(__DirectiveLocation); @@ -12,4 +13,5 @@ public static class IntrospectionTypeNames public const string __Type = nameof(__Type); public const string __TypeKind = nameof(__TypeKind); // ReSharper restore InconsistentNaming +#pragma warning restore IDE1006 // Naming Styles } diff --git a/src/HotChocolate/Spatial/src/Data/Projections/Extensions/Extensions/QueryableSpatialProjectionScalarHandler.cs b/src/HotChocolate/Spatial/src/Data/Projections/Extensions/Extensions/QueryableSpatialProjectionScalarHandler.cs index 48fd21c4b2a..9b0808e3d1e 100644 --- a/src/HotChocolate/Spatial/src/Data/Projections/Extensions/Extensions/QueryableSpatialProjectionScalarHandler.cs +++ b/src/HotChocolate/Spatial/src/Data/Projections/Extensions/Extensions/QueryableSpatialProjectionScalarHandler.cs @@ -12,5 +12,5 @@ public override bool CanHandle(Selection selection) => selection.Field.Member is not null && typeof(Geometry).IsAssignableFrom(selection.Field.Member.GetReturnType()); - public new static QueryableSpatialProjectionScalarHandler Create(ProjectionProviderContext context) => new(); + public static new QueryableSpatialProjectionScalarHandler Create(ProjectionProviderContext context) => new(); } diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonTypeSerializerTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonTypeSerializerTests.cs index 06ead27f229..4677349007d 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonTypeSerializerTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonTypeSerializerTests.cs @@ -202,7 +202,7 @@ public void TryParseString_Should_Parse_GeometryTypeName(string typeName) var serializer = GeoJsonTypeSerializer.Default; // act - var success = serializer.TryParseString(typeName, out var resultValue); + var success = serializer.TryParseString(typeName, out _); // assert Assert.True(success); diff --git a/src/HotChocolate/Utilities/src/Utilities.Buffers/FixedSizeArrayPool.cs b/src/HotChocolate/Utilities/src/Utilities.Buffers/FixedSizeArrayPool.cs index a8e4df61cba..d6aa5110957 100644 --- a/src/HotChocolate/Utilities/src/Utilities.Buffers/FixedSizeArrayPool.cs +++ b/src/HotChocolate/Utilities/src/Utilities.Buffers/FixedSizeArrayPool.cs @@ -48,7 +48,7 @@ public void Return(byte[] array) #if NET8_0_OR_GREATER ArgumentNullException.ThrowIfNull(array); #else - if(array is null) + if (array is null) { throw new ArgumentNullException(nameof(array)); } diff --git a/src/HotChocolate/Utilities/src/Utilities.Buffers/JsonMemory.cs b/src/HotChocolate/Utilities/src/Utilities.Buffers/JsonMemory.cs index 9b21a6fd4d5..4569611345c 100644 --- a/src/HotChocolate/Utilities/src/Utilities.Buffers/JsonMemory.cs +++ b/src/HotChocolate/Utilities/src/Utilities.Buffers/JsonMemory.cs @@ -21,7 +21,7 @@ public static void Reconfigure(Func factory) #if NET8_0_OR_GREATER ArgumentNullException.ThrowIfNull(factory); #else - if(factory is null) + if (factory is null) { throw new ArgumentNullException(nameof(factory)); } diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionComposeCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionComposeCommand.cs index aaa5135de7d..bbd9bf7fd16 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionComposeCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionComposeCommand.cs @@ -496,7 +496,7 @@ public static void WriteCompositionLog( foreach (var sourceSchemaFile in sourceSchemaFiles) { - var (schemaName, sourceText, settings ) = await ReadSourceSchemaAsync(sourceSchemaFile, cancellationToken); + var (schemaName, sourceText, settings) = await ReadSourceSchemaAsync(sourceSchemaFile, cancellationToken); sourceSchemas.Add(schemaName, (sourceText, settings)); } diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishCommand.cs index 7d4938ce756..60c7b459ffc 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishCommand.cs @@ -241,7 +241,7 @@ await console context, console, client, - cancellationToken);; + cancellationToken); }); // start diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionValidateCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionValidateCommand.cs index dda074d20db..eb1002eb967 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionValidateCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionValidateCommand.cs @@ -10,7 +10,6 @@ using ChilliCream.Nitro.CommandLine.Helpers; using ChilliCream.Nitro.CommandLine.FusionCompatibility; using ChilliCream.Nitro.CommandLine.Options; -using HotChocolate.Fusion.Logging; using HotChocolate.Fusion.Packaging; using StrawberryShake; using static ChilliCream.Nitro.CommandLine.ThrowHelper; @@ -185,7 +184,9 @@ async Task ValidateSchemaAsync(StatusContext? ctx, Stream schemaStream) { var input = new ValidateSchemaInput { - ApiId = apiId, Stage = stageName, Schema = new Upload(schemaStream, "schema.graphql") + ApiId = apiId, + Stage = stageName, + Schema = new Upload(schemaStream, "schema.graphql") }; console.Log("Create validation request"); diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs index 1d13a61a3bd..7c8110e1b0e 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs @@ -14,7 +14,7 @@ namespace ChilliCream.Nitro.CommandLine.Commands.Mcp; internal sealed class DeleteMcpFeatureCollectionCommand : Command { - public DeleteMcpFeatureCollectionCommand() : base("delete") + public DeleteMcpFeatureCollectionCommand() : base("delete") { Description = "Deletes an MCP Feature Collection"; diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs index 71a09813bc5..b359db8d458 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs @@ -27,7 +27,7 @@ public ListMcpFeatureCollectionCommand() : base("list") Bind.FromServiceProvider()); } - private static async Task ExecuteAsync( + private static async Task ExecuteAsync( InvocationContext context, IAnsiConsole console, IApiClient client, diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpPromptFilePatternOption.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpPromptFilePatternOption.cs index af17418966a..609057a7ad7 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpPromptFilePatternOption.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpPromptFilePatternOption.cs @@ -1,6 +1,6 @@ namespace ChilliCream.Nitro.CommandLine.Commands.Mcp.Options; -public class McpPromptFilePatternOption: Option> +public class McpPromptFilePatternOption : Option> { public McpPromptFilePatternOption() : base("--prompt-pattern") { diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpToolFilePatternOption.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpToolFilePatternOption.cs index aa4e606a0d0..f08f0f46328 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpToolFilePatternOption.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpToolFilePatternOption.cs @@ -1,6 +1,6 @@ namespace ChilliCream.Nitro.CommandLine.Commands.Mcp.Options; -public class McpToolFilePatternOption: Option> +public class McpToolFilePatternOption : Option> { public McpToolFilePatternOption() : base("--tool-pattern") { diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs index f705d37242b..1cde17e21e4 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs @@ -14,7 +14,7 @@ namespace ChilliCream.Nitro.CommandLine.Commands.OpenApi; internal sealed class DeleteOpenApiCollectionCommand : Command { - public DeleteOpenApiCollectionCommand() : base("delete") + public DeleteOpenApiCollectionCommand() : base("delete") { Description = "Deletes an OpenAPI collection"; diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs index 91b346b36ec..2a02d6e373a 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs @@ -27,7 +27,7 @@ public ListOpenApiCollectionCommand() : base("list") Bind.FromServiceProvider()); } - private static async Task ExecuteAsync( + private static async Task ExecuteAsync( InvocationContext context, IAnsiConsole console, IApiClient client, diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/Options/OpenApiCollectionFilePatternOption.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/Options/OpenApiCollectionFilePatternOption.cs index 575016a36ca..56405bbea21 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/Options/OpenApiCollectionFilePatternOption.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/Options/OpenApiCollectionFilePatternOption.cs @@ -1,6 +1,6 @@ namespace ChilliCream.Nitro.CommandLine.Commands.OpenApi.Options; -public class OpenApiCollectionFilePatternOption: Option> +public class OpenApiCollectionFilePatternOption : Option> { public OpenApiCollectionFilePatternOption() : base("--pattern") { diff --git a/src/Nitro/CommandLine/src/CommandLine/Helpers/GlobMatcher.cs b/src/Nitro/CommandLine/src/CommandLine/Helpers/GlobMatcher.cs index c6208491561..a33f93d78dc 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Helpers/GlobMatcher.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Helpers/GlobMatcher.cs @@ -5,7 +5,8 @@ namespace ChilliCream.Nitro.CommandLine; internal static class GlobMatcher { - public static IEnumerable Match(IEnumerable patterns) { + public static IEnumerable Match(IEnumerable patterns) + { var results = new List(); var relativePatterns = new List(); diff --git a/src/StrawberryShake/Client/test/Transport.InMemory.Tests/InMemoryClientTests.cs b/src/StrawberryShake/Client/test/Transport.InMemory.Tests/InMemoryClientTests.cs index 92b8e344c2c..3c3adda3ce4 100644 --- a/src/StrawberryShake/Client/test/Transport.InMemory.Tests/InMemoryClientTests.cs +++ b/src/StrawberryShake/Client/test/Transport.InMemory.Tests/InMemoryClientTests.cs @@ -73,7 +73,7 @@ await Record.ExceptionAsync(async () => public async Task ExecuteAsync_Default_ExecuteQuery() { // arrange - var client = new InMemoryClient("Foo"); ; + var client = new InMemoryClient("Foo"); var operationRequest = new OperationRequest("foo", new StubDocument(), new Dictionary()); var executor = new StubExecutor(); client.Executor = executor;