File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
src/GraphQL.Upload.AspNetCore Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ public async Task InvokeAsync(HttpContext context)
90
90
Schema = schema ,
91
91
Query = request . Query ,
92
92
OperationName = request . OperationName ,
93
- Inputs = request . GetInputs ( )
93
+ Inputs = request . GetInputs ( ) ,
94
+ UserContext = _options . UserContextFactory ? . Invoke ( context )
94
95
}
95
96
) ) ) ;
96
97
Original file line number Diff line number Diff line change 1
- namespace GraphQL . Upload . AspNetCore
1
+ using System ;
2
+ using Microsoft . AspNetCore . Http ;
3
+
4
+ namespace GraphQL . Upload . AspNetCore
2
5
{
3
6
/// <summary>
4
7
/// Options for <see cref="GraphQLUploadMiddleware{TSchema}"/>.
@@ -14,5 +17,10 @@ public class GraphQLUploadOptions
14
17
/// The maximum allowed amount of files. Null indicates no limit at all.
15
18
/// </summary>
16
19
public long ? MaximumFileCount { get ; set ; }
20
+
21
+ /// <summary>
22
+ /// Gets or sets the user context factory.
23
+ /// </summary>
24
+ public Func < HttpContext , object > UserContextFactory { get ; set ; }
17
25
}
18
26
}
You can’t perform that action at this time.
0 commit comments