From 01ced21b20fefd2acd827b404aea81574b85e30a Mon Sep 17 00:00:00 2001 From: Andrii Chebukin Date: Wed, 18 Oct 2023 02:24:55 +0400 Subject: [PATCH] Removed unused exceptions bag --- src/FSharp.Data.GraphQL.Server/Executor.fs | 2 -- src/FSharp.Data.GraphQL.Shared/TypeSystem.fs | 5 ----- 2 files changed, 7 deletions(-) diff --git a/src/FSharp.Data.GraphQL.Server/Executor.fs b/src/FSharp.Data.GraphQL.Server/Executor.fs index e20684df9..6ad5b8288 100644 --- a/src/FSharp.Data.GraphQL.Server/Executor.fs +++ b/src/FSharp.Data.GraphQL.Server/Executor.fs @@ -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() let root = data |> Option.map box |> Option.toObj match coerceVariables executionPlan.Variables variables with | Error errs -> return prepareOutput (GQLExecutionResult.Error (documentId, errs, executionPlan.Metadata)) @@ -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 diff --git a/src/FSharp.Data.GraphQL.Shared/TypeSystem.fs b/src/FSharp.Data.GraphQL.Shared/TypeSystem.fs index 1b3dea8d5..e77d2291e 100644 --- a/src/FSharp.Data.GraphQL.Shared/TypeSystem.fs +++ b/src/FSharp.Data.GraphQL.Shared/TypeSystem.fs @@ -855,8 +855,6 @@ and ExecutionContext = ExecutionPlan : ExecutionPlan /// Collection of variables provided to execute current operation. Variables : ImmutableDictionary - /// Collection of errors that occurred while executing current operation. - Errors : ConcurrentBag /// 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. @@ -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