Skip to content

Commit

Permalink
Removed unused exceptions bag
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri committed Oct 19, 2023
1 parent dd2d83c commit 01ced21
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/FSharp.Data.GraphQL.Server/Executor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ type Executor<'Root>(schema: ISchema<'Root>, middlewares : IExecutorMiddleware s
| Stream (stream) -> GQLExecutionResult.Stream (documentId, stream, res.Metadata)
async {
try
let errors = System.Collections.Concurrent.ConcurrentBag<exn>()
let root = data |> Option.map box |> Option.toObj
match coerceVariables executionPlan.Variables variables with
| Error errs -> return prepareOutput (GQLExecutionResult.Error (documentId, errs, executionPlan.Metadata))
Expand All @@ -118,7 +117,6 @@ type Executor<'Root>(schema: ISchema<'Root>, middlewares : IExecutorMiddleware s
RootValue = root
ExecutionPlan = executionPlan
Variables = variables
Errors = errors
FieldExecuteMap = fieldExecuteMap
Metadata = executionPlan.Metadata }
let! res = runMiddlewares (fun x -> x.ExecuteOperationAsync) executionCtx executeOperation |> AsyncVal.toAsync
Expand Down
5 changes: 0 additions & 5 deletions src/FSharp.Data.GraphQL.Shared/TypeSystem.fs
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,6 @@ and ExecutionContext =
ExecutionPlan : ExecutionPlan
/// Collection of variables provided to execute current operation.
Variables : ImmutableDictionary<string, obj>
/// Collection of errors that occurred while executing current operation.
Errors : ConcurrentBag<exn>
/// A map of all fields of the query and their respective execution operations.
FieldExecuteMap : FieldExecuteMap
/// A simple dictionary to hold metadata that can be used by execution customizations.
Expand Down Expand Up @@ -884,9 +882,6 @@ and ResolveFieldContext =
/// Field path
Path : FieldPath }

/// Remembers an exception, so it can be included in the final response.
member x.AddError(error : exn) = x.Context.Errors.Add error

/// Tries to find an argument by provided name.
member x.TryArg(name : string) : 't option =
match Map.tryFind name x.Args with
Expand Down

0 comments on commit 01ced21

Please sign in to comment.