Skip to content

Commit a85a691

Browse files
authored
Invoke virtual (#738)
1 parent cb1b8e1 commit a85a691

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Transports.AspNetCore/GraphQLHttpMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public GraphQLHttpMiddleware(IGraphQLTextSerializer serializer)
3838
_serializer = serializer;
3939
}
4040

41-
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
41+
public virtual async Task InvokeAsync(HttpContext context, RequestDelegate next)
4242
{
4343
if (context.WebSockets.IsWebSocketRequest)
4444
{

src/Transports.Subscriptions.WebSockets/GraphQLWebSocketsMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public GraphQLWebSocketsMiddleware(ILogger<GraphQLWebSocketsMiddleware<TSchema>>
2222
_logger = logger;
2323
}
2424

25-
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
25+
public virtual async Task InvokeAsync(HttpContext context, RequestDelegate next)
2626
{
2727
using (_logger.BeginScope(new Dictionary<string, object>
2828
{

tests/ApiApprovalTests/GraphQL.Server.Transports.AspNetCore.approved.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace GraphQL.Server.Transports.AspNetCore
3232
protected virtual System.Threading.Tasks.Task HandleInvalidHttpMethodErrorAsync(Microsoft.AspNetCore.Http.HttpContext context) { }
3333
protected virtual System.Threading.Tasks.Task HandleNoQueryErrorAsync(Microsoft.AspNetCore.Http.HttpContext context) { }
3434
protected virtual System.Threading.Tasks.Task HandleRequestAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.RequestDelegate next, System.Collections.Generic.IDictionary<string, object> userContext, GraphQL.Transport.GraphQLRequest[] bodyGQLBatchRequest, GraphQL.Transport.GraphQLRequest gqlRequest, GraphQL.Server.IGraphQLExecuter<TSchema> executer, System.Threading.CancellationToken cancellationToken) { }
35-
public System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.RequestDelegate next) { }
35+
public virtual System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.RequestDelegate next) { }
3636
protected virtual System.Threading.Tasks.Task RequestExecutedAsync(in GraphQL.Server.Transports.AspNetCore.GraphQLRequestExecutionResult requestExecutionResult) { }
3737
protected virtual System.Threading.Tasks.Task RequestExecutingAsync(GraphQL.Transport.GraphQLRequest request, int? indexInBatch = default) { }
3838
protected virtual System.Threading.Tasks.Task WriteErrorResponseAsync(Microsoft.AspNetCore.Http.HttpContext context, string errorMessage, System.Net.HttpStatusCode httpStatusCode) { }

tests/ApiApprovalTests/GraphQL.Server.Transports.Subscriptions.WebSockets.approved.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace GraphQL.Server.Transports.WebSockets
1616
where TSchema : GraphQL.Types.ISchema
1717
{
1818
public GraphQLWebSocketsMiddleware(Microsoft.Extensions.Logging.ILogger<GraphQL.Server.Transports.WebSockets.GraphQLWebSocketsMiddleware<TSchema>> logger) { }
19-
public System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.RequestDelegate next) { }
19+
public virtual System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.RequestDelegate next) { }
2020
}
2121
public interface IWebSocketConnectionFactory<TSchema>
2222
where TSchema : GraphQL.Types.ISchema

0 commit comments

Comments
 (0)