From 88580a10be8a0289f40590808f61e7c8bc7be67b Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Mon, 23 Dec 2024 15:46:06 +0100 Subject: [PATCH] Access formatters more efficiently. (#7863) --- .../Types.Mutations/MutationConventionTypeInterceptor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HotChocolate/Core/src/Types.Mutations/MutationConventionTypeInterceptor.cs b/src/HotChocolate/Core/src/Types.Mutations/MutationConventionTypeInterceptor.cs index 8dd76a0d80f..192e13a07bb 100644 --- a/src/HotChocolate/Core/src/Types.Mutations/MutationConventionTypeInterceptor.cs +++ b/src/HotChocolate/Core/src/Types.Mutations/MutationConventionTypeInterceptor.cs @@ -227,12 +227,12 @@ private void TryApplyInputConvention( var argumentType = _completionContext.GetType(argument.Type!); - var formatter = - argument.Formatters.Count switch + var formatters = argument.GetFormatters(); + var formatter = formatters.Count switch { 0 => null, - 1 => argument.Formatters[0], - _ => new AggregateInputValueFormatter(argument.Formatters), + 1 => formatters[0], + _ => new AggregateInputValueFormatter(formatters), }; var defaultValue = argument.DefaultValue;