diff --git a/src/HotChocolate/Core/src/Abstractions/NameString.cs b/src/HotChocolate/Core/src/Abstractions/NameString.cs
index 6fd5a9047e5..5788ad501c4 100644
--- a/src/HotChocolate/Core/src/Abstractions/NameString.cs
+++ b/src/HotChocolate/Core/src/Abstractions/NameString.cs
@@ -1,4 +1,6 @@
using System;
+using System.Collections;
+using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using HotChocolate.Language;
@@ -234,3 +236,33 @@ internal static NameString ConvertFromString(string s)
? new NameString()
: new NameString(s);
}
+
+///
+/// Provides comparers for .
+///
+public static class NameStringComparer
+{
+ public static IEqualityComparer Ordinal { get; } =
+ new OrdinalComparer();
+
+ public static IEqualityComparer OrdinalIgnoreCase { get; } =
+ new OrdinalIgnoreCaseComparer();
+
+ private sealed class OrdinalIgnoreCaseComparer : IEqualityComparer
+ {
+ public bool Equals(NameString x, NameString y)
+ => x.Equals(y, StringComparison.OrdinalIgnoreCase);
+
+ public int GetHashCode(NameString obj)
+ => StringComparer.OrdinalIgnoreCase.GetHashCode(obj.Value);
+ }
+
+ private sealed class OrdinalComparer : IEqualityComparer
+ {
+ public bool Equals(NameString x, NameString y)
+ => x.Equals(y, StringComparison.Ordinal);
+
+ public int GetHashCode(NameString obj)
+ => obj.Value.GetHashCode();
+ }
+}
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor.cs
index d6c483c5aff..de43a92bda2 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor.cs
@@ -1,9 +1,13 @@
using System;
+using System.Collections.Generic;
using HotChocolate.Language;
using HotChocolate.Types.Descriptors.Definitions;
namespace HotChocolate.Types;
+///
+/// A fluent configuration API for GraphQL enum types.
+///
public interface IEnumTypeDescriptor
: IDescriptor
, IFluent
@@ -34,6 +38,12 @@ IEnumTypeDescriptor SyntaxNode(
///
IEnumTypeDescriptor Description(string value);
+ ///
+ /// Defines a value that should be included on the enum type.
+ ///
+ ///
+ /// The value to include.
+ ///
[Obsolete("Use `Value`.")]
IEnumValueDescriptor Item(T value);
@@ -45,9 +55,21 @@ IEnumTypeDescriptor SyntaxNode(
///
IEnumValueDescriptor Value(T value);
+ ///
+ /// Specifies if the enum values shall be inferred or explicitly specfied.
+ ///
+ ///
+ /// The binding behavior.
+ ///
[Obsolete("Use `BindValues`.")]
IEnumTypeDescriptor BindItems(BindingBehavior behavior);
+ ///
+ /// Specifies if the enum values shall be inferred or explicitly specfied.
+ ///
+ ///
+ /// The binding behavior.
+ ///
IEnumTypeDescriptor BindValues(BindingBehavior behavior);
///
@@ -61,13 +83,55 @@ IEnumTypeDescriptor SyntaxNode(
///
IEnumTypeDescriptor BindValuesImplicitly();
+ ///
+ /// Specifies the enum name comparer that will be used to validate
+ /// if an enum name represents an enum value of this type.
+ ///
+ ///
+ /// The equality comparer for enum names.
+ ///
+ IEnumTypeDescriptor NameComparer(IEqualityComparer comparer);
+
+ ///
+ /// Specifies the runtime value comparer that will be used to validate
+ /// if a runtime value represents a GraphQL enum value of this type.
+ ///
+ ///
+ /// The equality comparer for enum names.
+ ///
+ IEnumTypeDescriptor ValueComparer(IEqualityComparer