From 81a44c9b389c5c748299da9283aba3d265f840b0 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Fri, 1 Sep 2023 15:01:09 +0200 Subject: [PATCH] Fixed options check for mutation conventions . --- .../Extensions/ObjectFieldDefinitionExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HotChocolate/Core/src/Types.Mutations/Extensions/ObjectFieldDefinitionExtensions.cs b/src/HotChocolate/Core/src/Types.Mutations/Extensions/ObjectFieldDefinitionExtensions.cs index b4882d2c29f..254934c3304 100644 --- a/src/HotChocolate/Core/src/Types.Mutations/Extensions/ObjectFieldDefinitionExtensions.cs +++ b/src/HotChocolate/Core/src/Types.Mutations/Extensions/ObjectFieldDefinitionExtensions.cs @@ -40,7 +40,7 @@ public static void AddErrorType( throw new ArgumentNullException(nameof(errorType)); } - if (descriptorContext.ContextData.ContainsKey(MutationContextDataKeys.Options)) + if (!descriptorContext.ContextData.ContainsKey(MutationContextDataKeys.Options)) { var richMessage = string.Format( MutationConvention_ShouldBeEnabled_WhenAddingErrorType,