Skip to content

Commit 01ced21

Browse files
committed
Removed unused exceptions bag
1 parent dd2d83c commit 01ced21

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/FSharp.Data.GraphQL.Server/Executor.fs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ type Executor<'Root>(schema: ISchema<'Root>, middlewares : IExecutorMiddleware s
108108
| Stream (stream) -> GQLExecutionResult.Stream (documentId, stream, res.Metadata)
109109
async {
110110
try
111-
let errors = System.Collections.Concurrent.ConcurrentBag<exn>()
112111
let root = data |> Option.map box |> Option.toObj
113112
match coerceVariables executionPlan.Variables variables with
114113
| Error errs -> return prepareOutput (GQLExecutionResult.Error (documentId, errs, executionPlan.Metadata))
@@ -118,7 +117,6 @@ type Executor<'Root>(schema: ISchema<'Root>, middlewares : IExecutorMiddleware s
118117
RootValue = root
119118
ExecutionPlan = executionPlan
120119
Variables = variables
121-
Errors = errors
122120
FieldExecuteMap = fieldExecuteMap
123121
Metadata = executionPlan.Metadata }
124122
let! res = runMiddlewares (fun x -> x.ExecuteOperationAsync) executionCtx executeOperation |> AsyncVal.toAsync

src/FSharp.Data.GraphQL.Shared/TypeSystem.fs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -855,8 +855,6 @@ and ExecutionContext =
855855
ExecutionPlan : ExecutionPlan
856856
/// Collection of variables provided to execute current operation.
857857
Variables : ImmutableDictionary<string, obj>
858-
/// Collection of errors that occurred while executing current operation.
859-
Errors : ConcurrentBag<exn>
860858
/// A map of all fields of the query and their respective execution operations.
861859
FieldExecuteMap : FieldExecuteMap
862860
/// A simple dictionary to hold metadata that can be used by execution customizations.
@@ -884,9 +882,6 @@ and ResolveFieldContext =
884882
/// Field path
885883
Path : FieldPath }
886884

887-
/// Remembers an exception, so it can be included in the final response.
888-
member x.AddError(error : exn) = x.Context.Errors.Add error
889-
890885
/// Tries to find an argument by provided name.
891886
member x.TryArg(name : string) : 't option =
892887
match Map.tryFind name x.Args with

0 commit comments

Comments
 (0)