Skip to content

Enabled nullable reference types in the HotChocolate.Types project #8413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable enable
using HotChocolate.Language;

namespace HotChocolate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
using HotChocolate.Types.Descriptors;
using HotChocolate.Types.Descriptors.Configurations;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class AggregateTypeInterceptor : TypeInterceptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using HotChocolate.Types.Descriptors;
using HotChocolate.Utilities;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class ExtendedTypeRefEqualityComparer : IEqualityComparer<ExtendedTypeReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace HotChocolate.Configuration;

internal readonly record struct ConventionKey(Type Convention, string? Scope);
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using HotChocolate.Types.Descriptors;

namespace HotChocolate.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using HotChocolate.Resolvers;

namespace HotChocolate.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace HotChocolate.Configuration;

public sealed record RuntimeTypeNameBinding(Type RuntimeType, string TypeName);
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using HotChocolate.Language;

namespace HotChocolate.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.Collections;

namespace HotChocolate.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.Collections.Immutable;

namespace HotChocolate.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.Collections.Immutable;
using HotChocolate.Internal;
using HotChocolate.Language;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using HotChocolate.Internal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable enable
using HotChocolate.Internal;
using HotChocolate.Types.Descriptors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using HotChocolate.Utilities;
using ExtendedType = HotChocolate.Internal.ExtendedType;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class ExtendedTypeReferenceHandler(ITypeInspector typeInspector) : ITypeRegistrarHandler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.Diagnostics.CodeAnalysis;
using HotChocolate.Internal;
using HotChocolate.Types;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class SchemaTypeReferenceHandler : ITypeRegistrarHandler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class SyntaxTypeReferenceHandler : ITypeRegistrarHandler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable enable
using HotChocolate.Internal;
using HotChocolate.Types.Descriptors;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

internal interface ITypeRegistrar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using HotChocolate.Types.Descriptors.Configurations;

#nullable enable

namespace HotChocolate.Configuration;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using HotChocolate.Types.Descriptors.Configurations;

#nullable enable

namespace HotChocolate.Configuration;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using HotChocolate.Types.Descriptors.Configurations;

#nullable enable

namespace HotChocolate.Configuration;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using HotChocolate.Types.Descriptors.Configurations;

#nullable enable

namespace HotChocolate.Configuration;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using HotChocolate.Resolvers;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class RegisteredResolver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
using static HotChocolate.Properties.TypeResources;
using static HotChocolate.Utilities.ThrowHelper;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed partial class RegisteredType : ITypeCompletionContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using HotChocolate.Types.Descriptors;
using HotChocolate.Types.Descriptors.Configurations;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed partial class RegisteredType : ITypeDiscoveryContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using HotChocolate.Types.Descriptors;
using HotChocolate.Types.Descriptors.Configurations;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed partial class RegisteredType : IHasRuntimeType
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Types/Configuration/RootTypeKind.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace HotChocolate.Configuration;

internal enum RootTypeKind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using HotChocolate.Types.Descriptors;
using HotChocolate.Types.Introspection;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class TypeDiscoverer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

internal static class TypeDiscoveryDescriptorContextExtensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
using static HotChocolate.Properties.TypeResources;
using static HotChocolate.Types.Descriptors.Configurations.TypeDependencyFulfilled;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class TypeInitializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using HotChocolate.Types.Descriptors;
using HotChocolate.Types.Descriptors.Configurations;

#nullable enable

namespace HotChocolate.Configuration;

// note: this type is considered internal and should not be used by users.
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Types/Configuration/TypeLookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using HotChocolate.Language;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class TypeLookup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class TypeReferenceResolver
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using HotChocolate.Types;
using static HotChocolate.Utilities.ThrowHelper;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed partial class TypeRegistrar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using HotChocolate.Types.Descriptors;
using HotChocolate.Utilities;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed partial class TypeRegistrar : ITypeRegistrar
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Types/Configuration/TypeRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using HotChocolate.Utilities;
using static HotChocolate.Utilities.ThrowHelper;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class TypeRegistry
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Types/Configuration/TypeTrimmer.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using HotChocolate.Types;
using HotChocolate.Utilities;

#nullable enable

namespace HotChocolate.Configuration;

internal sealed class TypeTrimmer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using HotChocolate.Types.Descriptors;

namespace HotChocolate.Configuration.Validation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using HotChocolate.Language;
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using HotChocolate.Types.Descriptors;
using static HotChocolate.Configuration.Validation.TypeValidationHelper;

#nullable enable

namespace HotChocolate.Configuration.Validation;

internal sealed class InterfaceTypeValidationRule : ISchemaValidationRule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.Text;
using HotChocolate.Language;
using HotChocolate.Language.Visitors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using HotChocolate.Utilities;
using static HotChocolate.Configuration.Validation.TypeValidationHelper;

#nullable enable

namespace HotChocolate.Configuration.Validation;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using HotChocolate.Types;
using static HotChocolate.Utilities.ErrorHelper;

#nullable enable

namespace HotChocolate.Configuration.Validation;

internal static class TypeValidationHelper
Expand Down
2 changes: 2 additions & 0 deletions src/HotChocolate/Core/src/Types/Contracts/IFluent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#nullable disable

using System.ComponentModel;

namespace HotChocolate;
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Types/Contracts/ISchemaBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using HotChocolate.Types;
using HotChocolate.Types.Descriptors;

#nullable enable

namespace HotChocolate;

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/HotChocolate/Core/src/Types/Contracts/ISchemaError.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using HotChocolate.Language;
using HotChocolate.Types;

#nullable enable

namespace HotChocolate;

public interface ISchemaError
Expand Down
Loading
Loading