diff --git a/.build/Build.Tests.2.cs b/.build/Build.Tests.2.cs
index f243121e07f..edbc34dabe3 100644
--- a/.build/Build.Tests.2.cs
+++ b/.build/Build.Tests.2.cs
@@ -57,10 +57,6 @@ partial class Build
.Produces(TestResultDirectory / "*.trx")
.Executes(() => RunTests(SourceDirectory / "HotChocolate" / "Diagnostics" / "HotChocolate.Diagnostics.sln"));
- Target TestHotChocolateFilters => _ => _
- .Produces(TestResultDirectory / "*.trx")
- .Executes(() => RunTests(SourceDirectory / "HotChocolate" / "Filters" / "HotChocolate.Filters.sln"));
-
Target TestHotChocolateFusion => _ => _
.Produces(TestResultDirectory / "*.trx")
.Executes(() => RunTests(SourceDirectory / "HotChocolate" / "Fusion" / "HotChocolate.Fusion.sln"));
@@ -77,10 +73,6 @@ partial class Build
.Produces(TestResultDirectory / "*.trx")
.Executes(() => RunTests(SourceDirectory / "HotChocolate" / "MongoDb" / "HotChocolate.MongoDb.sln"));
- Target TestHotChocolateNeo4J => _ => _
- .Produces(TestResultDirectory / "*.trx")
- .Executes(() => RunTests(SourceDirectory / "HotChocolate" / "Neo4J" / "HotChocolate.Neo4J.sln"));
-
Target TestHotChocolateOpenApi => _ => _
.Produces(TestResultDirectory / "*.trx")
.Executes(() => RunTests(SourceDirectory / "HotChocolate" / "OpenApi" / "HotChocolate.OpenApi.sln"));
@@ -101,10 +93,6 @@ partial class Build
.Produces(TestResultDirectory / "*.trx")
.Executes(() => RunTests(SourceDirectory / "HotChocolate" / "Spatial" / "HotChocolate.Spatial.sln"));
- Target TestHotChocolateStitching => _ => _
- .Produces(TestResultDirectory / "*.trx")
- .Executes(() => RunTests(SourceDirectory / "HotChocolate" / "Stitching" / "HotChocolate.Stitching.sln"));
-
Target TestHotChocolateUtilities => _ => _
.Produces(TestResultDirectory / "*.trx")
.Executes(() => RunTests(SourceDirectory / "HotChocolate" / "Utilities" / "HotChocolate.Utilities.sln"));
diff --git a/.build/Build.Tests.cs b/.build/Build.Tests.cs
index 4f0dab1af4e..75160e63407 100644
--- a/.build/Build.Tests.cs
+++ b/.build/Build.Tests.cs
@@ -61,17 +61,14 @@ partial class Build
TestHotChocolateCore,
TestHotChocolateData,
TestHotChocolateDiagnostics,
- TestHotChocolateFilters,
TestHotChocolateFusion,
TestHotChocolateLanguage,
TestHotChocolateMarten,
TestHotChocolateMongoDb,
- TestHotChocolateNeo4J,
TestHotChocolatePersistedQueries,
TestHotChocolateRaven,
TestHotChocolateSkimmed,
TestHotChocolateSpatial,
- TestHotChocolateStitching,
TestHotChocolateUtilities,
TestStrawberryShakeClient,
TestStrawberryShakeCodeGeneration,
diff --git a/API-Baselines.md b/API-Baselines.md
deleted file mode 100644
index 76280870e46..00000000000
--- a/API-Baselines.md
+++ /dev/null
@@ -1,154 +0,0 @@
-# API Baselines
-
-This document contains information regarding API baseline files and how to work with them.
-
-## Files
-
-Each project contains two files tracking the public API surface of said project. These files are used by the [Microsoft.CodeAnalysis.PublicApiAnalyzers](https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers) roslyn analyzer as a reference to what the public API surface looked like previously.
-
-### PublicAPI.Shipped.txt
-
-This file contains APIs that were released in the last major version.
-
-This file should only be modified after a major release by the maintainers and should never be modified otherwise. There is a [script](#MarkApiShipped) to perform this automatically.
-
-### PublicAPI.Unshipped.txt
-
-This file contains API changes since the last major version.
-
-## Types of public API changes
-
-There are three types of public API changes that need to be documented.
-
-### New APIs
-
-This case will be indicated by an error/warning like the following:
-
-```
-RS0016: Symbol 'X' is not part of the declared API
-```
-
-It can be resolved by adding the new symbol to the `PublicAPI.Unshipped.txt` file:
-
-```
-#nullable enable
-Microsoft.AspNetCore.Builder.NewApplicationBuilder.New() -> Microsoft.AspNetCore.Builder.IApplicationBuilder!
-```
-
-This change can be performed automatically by your IDE or using a [script](#AddUnshippedApi).
-
-> Note: Be sure to apply the Code-Fix on a solution level, if there are many new APIs that need to be documented.
-> ![image](https://user-images.githubusercontent.com/45513122/119241399-47bbbe80-bb56-11eb-9253-92e2878cd428.png)
-
-### Removed APIs
-
-This case will be indicated by an error/warning like the following:
-
-```
-RS0017: Symbol 'X' is part of the declared API, but is either not public or could not be found
-```
-
-It can be resolved by adding the removed symbol to the `PublicAPI.Unshipped.txt` file:
-
-```
-#nullable enable
-*REMOVED*Microsoft.Builder.OldApplicationBuilder.New() -> Microsoft.AspNetCore.Builder.IApplicationBuilder!
-```
-
-This change needs to be done manually. Copy the relevant line from `PublicAPI.Shipped.txt` into `PublicAPI.Unshipped.txt` and place `*REMOVED*` in front of it.
-
-### Updated APIs
-
-Two new entries need to be added to the `PublicAPI.Unshipped.txt` file for an updated API. One to remove the old API and one for the new API. For example:
-
-```
-#nullable enable
-*REMOVED*Microsoft.AspNetCore.DataProtection.Infrastructure.IApplicationDiscriminator.Discriminator.get -> string!
-Microsoft.AspNetCore.DataProtection.Infrastructure.IApplicationDiscriminator.Discriminator.get -> string?
-```
-
-The removed case needs to be done manually as explained [here](#removed-apis).
-
-## Ignoring projects
-
-Projects ending in `.Tests` or `.Resources` are ignored per default.
-
-If you need to manually ignore a project, include the following in its `.csproj` file:
-
-```xml
-
- false
-
-```
-
-## New projects
-
-The two text files mentioned above need to be added to each new project.
-
-There is a template file called `PublicAPI.empty.txt` in the `src` directory that can be copied over into a new project.
-
-```sh
-DIR=""
-cp "src/PublicAPI.empty.txt" "src/$DIR/PublicAPI.Shipped.txt"
-cp "src/PublicAPI.empty.txt" "src/$DIR/PublicAPI.Unshipped.txt"
-```
-
-## Pipeline Job
-
-A PR to `main` will trigger a Pipeline job that runs the [CheckPublicApi script](#CheckPublicApi).
-
-The job is defined as part of [this Pipeline definition](./.github/workflows/check-public-api.yml).
-
-## Scripts
-
-There are some helpful scripts that accommodate working with the analyzer.
-
-The scripts can be executed via _Nuke_. Choose the appropriate `build` script for your platform (in the root directory) and pass one of the following arguments.
-
-### CheckPublicApi
-
-Executes a build and fails if there are undocumented changes.
-
-```bash
-./build.sh CheckPublicApi
-```
-
-### AddUnshippedApi
-
-This will use the `dotnet-format` tool to fix all the `RS0016` warnings of the `Microsoft.CodeAnalysis.PublicApiAnalyzers`.
-
-```bash
-./build.sh AddUnshippedApi
-```
-
-### DiffShippedApi
-
-This shows all changes of `PublicAPI.Shipped.txt` files between git refs. Tags, commit hashes and branch names are supported.
-
-```bash
-./build.sh DiffShippedApi --from 11.0.0 --to 12.0.0
-```
-
-### DisplayUnshippedApi
-
-This will output the contents of all `PublicAPI.Unshipped.txt` files throughout the project.
-
-```bash
-./build.sh DisplayUnshippedApi
-```
-
-If we only want to see the breaking changes, we can add the `breaking` flag:
-
-```bash
-./build.sh DisplayUnshippedApi --breaking
-```
-
-### MarkApiShipped
-
-This transfers all changes in the `PublicAPI.Unshipped.txt` to the `PublicAPI.Shipped.txt` files.
-
-It also takes care of removing lines marked with `*REMOVE*` (removals of APIs).
-
-```bash
-./build.sh MarkApiShipped
-```
diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs
index 0e6c173e2b5..20f0efbf252 100644
--- a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs
+++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs
@@ -131,54 +131,6 @@ public static IRequestExecutorBuilder AddGraphQLServer(
string? schemaName = default) =>
builder.Services.AddGraphQLServer(schemaName);
- [Obsolete(
- "Use the new configuration API -> " +
- "services.AddGraphQLServer().AddQueryType()...")]
- public static IServiceCollection AddGraphQL(
- this IServiceCollection services,
- ISchema schema,
- int maxAllowedRequestSize = MaxAllowedRequestSize) =>
- RequestExecutorBuilderLegacyHelper.SetSchema(
- services
- .AddGraphQLServerCore(maxAllowedRequestSize)
- .AddGraphQL()
- .AddDefaultHttpRequestInterceptor()
- .AddSubscriptionServices(),
- schema)
- .Services;
-
- [Obsolete(
- "Use the new configuration API -> " +
- "services.AddGraphQLServer().AddQueryType()...")]
- public static IServiceCollection AddGraphQL(
- this IServiceCollection services,
- Func schemaFactory,
- int maxAllowedRequestSize = MaxAllowedRequestSize) =>
- RequestExecutorBuilderLegacyHelper.SetSchema(
- services
- .AddGraphQLServerCore(maxAllowedRequestSize)
- .AddGraphQL()
- .AddDefaultHttpRequestInterceptor()
- .AddSubscriptionServices(),
- schemaFactory)
- .Services;
-
- [Obsolete(
- "Use the new configuration API -> " +
- "services.AddGraphQLServer().AddQueryType()...")]
- public static IServiceCollection AddGraphQL(
- this IServiceCollection services,
- ISchemaBuilder schemaBuilder,
- int maxAllowedRequestSize = MaxAllowedRequestSize) =>
- RequestExecutorBuilderLegacyHelper.SetSchemaBuilder(
- services
- .AddGraphQLServerCore(maxAllowedRequestSize)
- .AddGraphQL()
- .AddDefaultHttpRequestInterceptor()
- .AddSubscriptionServices(),
- schemaBuilder)
- .Services;
-
///
/// Registers the GraphQL Upload Scalar.
///
diff --git a/src/HotChocolate/Core/src/Abstractions/Execution/IQueryRequestBuilder.cs b/src/HotChocolate/Core/src/Abstractions/Execution/IQueryRequestBuilder.cs
index 3f50e88efaf..f66ec0f938d 100644
--- a/src/HotChocolate/Core/src/Abstractions/Execution/IQueryRequestBuilder.cs
+++ b/src/HotChocolate/Core/src/Abstractions/Execution/IQueryRequestBuilder.cs
@@ -41,10 +41,6 @@ IQueryRequestBuilder TryAddVariableValue(
IQueryRequestBuilder SetVariableValue(
string name, object? value);
- [Obsolete("Use `InitializeGlobalState`")]
- IQueryRequestBuilder SetProperties(
- Dictionary? properties);
-
///
/// Initializes the global state of the request to the given
/// .
@@ -54,10 +50,6 @@ IQueryRequestBuilder SetProperties(
IQueryRequestBuilder InitializeGlobalState(
Dictionary? initialState);
- [Obsolete("Use `InitializeGlobalState`")]
- IQueryRequestBuilder SetProperties(
- IDictionary? properties);
-
///
/// Initializes the global state of the request to the given
/// .
@@ -67,10 +59,6 @@ IQueryRequestBuilder SetProperties(
IQueryRequestBuilder InitializeGlobalState(
IDictionary? initialState);
- [Obsolete("Use `InitializeGlobalState`")]
- IQueryRequestBuilder SetProperties(
- IReadOnlyDictionary? properties);
-
///
/// Initializes the global state of the request to the given
/// .
@@ -80,10 +68,6 @@ IQueryRequestBuilder SetProperties(
IQueryRequestBuilder InitializeGlobalState(
IReadOnlyDictionary? initialState);
- [Obsolete("Use `AddGlobalState`")]
- IQueryRequestBuilder AddProperty(
- string name, object? value);
-
///
/// Sets the global state for
/// to the specified ,
@@ -98,10 +82,6 @@ IQueryRequestBuilder AddProperty(
IQueryRequestBuilder AddGlobalState(
string name, object? value);
- [Obsolete("Use `TryAddGlobalState`")]
- IQueryRequestBuilder TryAddProperty(
- string name, object? value);
-
///
/// Sets the global state for
/// to the specified ,
@@ -113,10 +93,6 @@ IQueryRequestBuilder TryAddProperty(
IQueryRequestBuilder TryAddGlobalState(
string name, object? value);
- [Obsolete("Use `SetGlobalState`")]
- IQueryRequestBuilder SetProperty(
- string name, object? value);
-
///
/// Sets the global state for
/// to the specified .
@@ -129,10 +105,6 @@ IQueryRequestBuilder SetProperty(
IQueryRequestBuilder SetGlobalState(
string name, object? value);
- [Obsolete("Use `RemoveGlobalState`")]
- IQueryRequestBuilder TryRemoveProperty(
- string name);
-
///
/// Removes the global state value for the specified
/// .
diff --git a/src/HotChocolate/Core/src/Abstractions/Execution/QueryRequestBuilder.cs b/src/HotChocolate/Core/src/Abstractions/Execution/QueryRequestBuilder.cs
index 580cebd6c38..4469a52483d 100644
--- a/src/HotChocolate/Core/src/Abstractions/Execution/QueryRequestBuilder.cs
+++ b/src/HotChocolate/Core/src/Abstractions/Execution/QueryRequestBuilder.cs
@@ -137,21 +137,11 @@ public IQueryRequestBuilder TryAddVariableValue(
return this;
}
- [Obsolete("Use `InitializeGlobalState`")]
- public IQueryRequestBuilder SetProperties(
- Dictionary? properties)
- => InitializeGlobalState(properties);
-
///
public IQueryRequestBuilder InitializeGlobalState(
Dictionary? initialState)
=> InitializeGlobalState((IDictionary?)initialState);
- [Obsolete("Use `InitializeGlobalState`")]
- public IQueryRequestBuilder SetProperties(
- IDictionary? properties)
- => InitializeGlobalState(properties);
-
///
public IQueryRequestBuilder InitializeGlobalState(
IDictionary? initialState)
@@ -163,11 +153,6 @@ public IQueryRequestBuilder InitializeGlobalState(
return this;
}
- [Obsolete("Use `InitializeGlobalState`")]
- public IQueryRequestBuilder SetProperties(
- IReadOnlyDictionary? properties)
- => InitializeGlobalState(properties);
-
///
public IQueryRequestBuilder InitializeGlobalState(
IReadOnlyDictionary? initialState)
@@ -177,10 +162,6 @@ public IQueryRequestBuilder InitializeGlobalState(
return this;
}
- [Obsolete("Use `SetGlobalState`")]
- public IQueryRequestBuilder SetProperty(string name, object? value)
- => SetGlobalState(name, value);
-
///
public IQueryRequestBuilder SetGlobalState(
string name, object? value)
@@ -191,11 +172,6 @@ public IQueryRequestBuilder SetGlobalState(
return this;
}
- [Obsolete("Use `AddGlobalState`")]
- public IQueryRequestBuilder AddProperty(
- string name, object? value)
- => AddGlobalState(name, value);
-
///
public IQueryRequestBuilder AddGlobalState(
string name, object? value)
@@ -206,11 +182,6 @@ public IQueryRequestBuilder AddGlobalState(
return this;
}
- [Obsolete("Use `TryAddGlobalState`")]
- public IQueryRequestBuilder TryAddProperty(
- string name, object? value)
- => TryAddGlobalState(name, value);
-
///
public IQueryRequestBuilder TryAddGlobalState(
string name, object? value)
@@ -224,10 +195,6 @@ public IQueryRequestBuilder TryAddGlobalState(
return this;
}
- [Obsolete("Use `RemoveGlobalState`")]
- public IQueryRequestBuilder TryRemoveProperty(string name)
- => RemoveGlobalState(name);
-
///
public IQueryRequestBuilder RemoveGlobalState(string name)
{
diff --git a/src/HotChocolate/Core/src/Execution/Configuration/DefaultResolverCompilerBuilder.cs b/src/HotChocolate/Core/src/Execution/Configuration/DefaultResolverCompilerBuilder.cs
deleted file mode 100644
index 0a117d4d37e..00000000000
--- a/src/HotChocolate/Core/src/Execution/Configuration/DefaultResolverCompilerBuilder.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-namespace HotChocolate.Execution.Configuration;
-
-///
-/// The default implementation.
-///
-[Obsolete("Implement IParameterExpressionBuilder")]
-internal sealed class DefaultResolverCompilerBuilder : IResolverCompilerBuilder
-{
- ///
- /// Initializes a new instance of .
- ///
- ///
- /// The for which we want to apply configuration.
- ///
- public DefaultResolverCompilerBuilder(IRequestExecutorBuilder requestExecutorBuilder)
- {
- RequestExecutorBuilder = requestExecutorBuilder;
- }
-
- ///
- public IRequestExecutorBuilder RequestExecutorBuilder { get; }
-}
diff --git a/src/HotChocolate/Core/src/Execution/Configuration/IResolverCompilerBuilder.cs b/src/HotChocolate/Core/src/Execution/Configuration/IResolverCompilerBuilder.cs
deleted file mode 100644
index fcc565f36f5..00000000000
--- a/src/HotChocolate/Core/src/Execution/Configuration/IResolverCompilerBuilder.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-namespace HotChocolate.Execution.Configuration;
-
-///
-/// The resolver compiler builder.
-///
-[Obsolete("Implement IParameterExpressionBuilder")]
-public interface IResolverCompilerBuilder
-{
- ///
- /// THe inner request executor builder.
- ///
- IRequestExecutorBuilder RequestExecutorBuilder { get; }
-}
diff --git a/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.ResolverCompiler.cs b/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.ResolverCompiler.cs
index 5fd00092182..02af215cd4f 100644
--- a/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.ResolverCompiler.cs
+++ b/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.ResolverCompiler.cs
@@ -8,38 +8,6 @@ namespace Microsoft.Extensions.DependencyInjection;
public static partial class RequestExecutorBuilderExtensions
{
- ///
- /// Configures the resolver compiler.
- ///
- ///
- /// The .
- ///
- ///
- /// A delegate that is to configure the resolver compiler.
- ///
- ///
- /// An that can be used to configure a schema
- /// and its execution.
- ///
- [Obsolete("Implement IParameterExpressionBuilder")]
- public static IRequestExecutorBuilder ConfigureResolverCompiler(
- this IRequestExecutorBuilder builder,
- Action configure)
- {
- if (builder is null)
- {
- throw new ArgumentNullException(nameof(builder));
- }
-
- if (configure is null)
- {
- throw new ArgumentNullException(nameof(configure));
- }
-
- configure(new DefaultResolverCompilerBuilder(builder));
- return builder;
- }
-
///
/// Registers a well-known service with the resolver compiler.
/// The service does no longer need any annotation in the resolver.
diff --git a/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.UseRequest.cs b/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.UseRequest.cs
index aee2dd1579a..8a9a95bfa32 100644
--- a/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.UseRequest.cs
+++ b/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.UseRequest.cs
@@ -202,11 +202,6 @@ public static IRequestExecutorBuilder UsePersistedQueryPipeline(
.UseOperationExecution();
}
- [Obsolete("Use UseAutomaticPersistedQueryPipeline")]
- public static IRequestExecutorBuilder UseActivePersistedQueryPipeline(
- this IRequestExecutorBuilder builder) =>
- UseAutomaticPersistedQueryPipeline(builder);
-
public static IRequestExecutorBuilder UseAutomaticPersistedQueryPipeline(
this IRequestExecutorBuilder builder)
{
diff --git a/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderLegacyHelper.cs b/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderLegacyHelper.cs
deleted file mode 100644
index 2555cfe27ef..00000000000
--- a/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderLegacyHelper.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-using System;
-using Microsoft.Extensions.DependencyInjection;
-
-// ReSharper disable once CheckNamespace
-namespace HotChocolate.Execution.Configuration;
-
-///
-/// Helper to enable legacy configurations.
-///
-public static class RequestExecutorBuilderLegacyHelper
-{
- ///
- /// Sets the schema builder that shall be used to configure the request executor.
- ///
- ///
- /// The .
- ///
- ///
- /// The schema builder that shall be used to configure the request executor.
- ///
- ///
- /// An that can be used to configure a schema
- /// and its execution.
- ///
- [Obsolete(
- "This helper only exists to allow legacy schema handling. " +
- "Consider moving to the new configuration API.")]
- public static IRequestExecutorBuilder SetSchemaBuilder(
- IRequestExecutorBuilder builder,
- ISchemaBuilder schemaBuilder)
- {
- if (builder is null)
- {
- throw new ArgumentNullException(nameof(builder));
- }
-
- if (schemaBuilder is null)
- {
- throw new ArgumentNullException(nameof(schemaBuilder));
- }
-
- return builder.Configure(options => options.SchemaBuilder = schemaBuilder);
- }
-
- ///
- /// Sets the schema builder that shall be used to configure the request executor.
- ///
- ///
- /// The .
- ///
- ///
- /// The schema that shall be used to configure the request executor.
- ///
- ///
- /// An that can be used to configure a schema
- /// and its execution.
- ///
- [Obsolete(
- "This helper only exists to allow legacy schema handling. " +
- "Consider moving to the new configuration API.")]
- public static IRequestExecutorBuilder SetSchema(
- IRequestExecutorBuilder builder,
- ISchema schema)
- {
- if (builder is null)
- {
- throw new ArgumentNullException(nameof(builder));
- }
-
- if (schema is null)
- {
- throw new ArgumentNullException(nameof(schema));
- }
-
- return builder.Configure(options => options.Schema = schema);
- }
-
- ///
- /// Sets the schema builder that shall be used to configure the request executor.
- ///
- ///
- /// The .
- ///
- ///
- /// The factory to create the schema.
- ///
- ///
- /// An that can be used to configure a schema
- /// and its execution.
- ///
- [Obsolete(
- "This helper only exists to allow legacy schema handling. " +
- "Consider moving to the new configuration API.")]
- public static IRequestExecutorBuilder SetSchema(
- IRequestExecutorBuilder builder,
- Func schemaFactory)
- {
- if (builder is null)
- {
- throw new ArgumentNullException(nameof(builder));
- }
-
- if (schemaFactory is null)
- {
- throw new ArgumentNullException(nameof(schemaFactory));
- }
-
- return builder.Configure((s, o) => o.Schema = schemaFactory(s));
- }
-}
diff --git a/src/HotChocolate/Core/src/Execution/DependencyInjection/ResolverCompilerBuilderExtensions.cs b/src/HotChocolate/Core/src/Execution/DependencyInjection/ResolverCompilerBuilderExtensions.cs
deleted file mode 100644
index da3636cfe75..00000000000
--- a/src/HotChocolate/Core/src/Execution/DependencyInjection/ResolverCompilerBuilderExtensions.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-using System;
-using System.Linq.Expressions;
-using System.Reflection;
-using HotChocolate;
-using HotChocolate.Execution.Configuration;
-using HotChocolate.Internal;
-using HotChocolate.Resolvers;
-
-// ReSharper disable once CheckNamespace
-namespace Microsoft.Extensions.DependencyInjection;
-
-///
-/// Extension methods for configuring an
-///
-public static class ResolverCompilerBuilderExtensions
-{
- ///
- /// Adds a custom parameter compiler to the resolver compiler.
- ///
- ///
- /// The .
- ///
- ///
- /// A expression that resolves the data for the custom parameter.
- ///
- ///
- /// A predicate that can be used to specify to which parameter the
- /// expression shall be applied to.
- ///
- ///
- /// The parameter result type.
- ///
- ///
- /// An that can be used to configure to
- /// chain in more configuration.
- ///
- [Obsolete("Implement IParameterExpressionBuilder")]
- public static IResolverCompilerBuilder AddParameter(
- this IResolverCompilerBuilder builder,
- Expression> expression,
- Func? canHandle = null)
- {
- if (builder is null)
- {
- throw new ArgumentNullException(nameof(builder));
- }
-
- if (expression is null)
- {
- throw new ArgumentNullException(nameof(expression));
- }
-
- if (canHandle is null)
- {
- builder.RequestExecutorBuilder.Services.AddParameterExpressionBuilder(
- _ => new CustomParameterExpressionBuilder(expression));
- }
- else
- {
- builder.RequestExecutorBuilder.Services.AddParameterExpressionBuilder(
- _ => new CustomParameterExpressionBuilder(expression, canHandle));
- }
- return builder;
- }
-
- ///
- /// Marks types as well-known services that no longer need the
- /// annotation.
- ///
- ///
- /// The .
- ///
- ///
- /// The well-known service type.
- ///
- ///
- /// An that can be used to configure to
- /// chain in more configuration.
- ///
- [Obsolete("Use RegisterService on the IRequestExecutorBuilder")]
- public static IResolverCompilerBuilder AddService(
- this IResolverCompilerBuilder builder)
- where TService : class
- {
- if (builder is null)
- {
- throw new ArgumentNullException(nameof(builder));
- }
-
- builder.RequestExecutorBuilder.Services.AddSingleton(
- new CustomServiceParameterExpressionBuilder());
- return builder;
- }
-
- ///
- /// Marks types as well-known scoped services that no longer need the
- /// annotation.
- ///
- ///
- /// The .
- ///
- ///
- /// The well-known scoped service type.
- ///
- ///
- /// An that can be used to configure to
- /// chain in more configuration.
- ///
- [Obsolete("Use RegisterService on the IRequestExecutorBuilder")]
- public static IResolverCompilerBuilder AddScopedService(
- this IResolverCompilerBuilder builder)
- where TService : class
- {
- if (builder is null)
- {
- throw new ArgumentNullException(nameof(builder));
- }
-
- builder.RequestExecutorBuilder.Services.AddSingleton(
- new CustomServiceParameterExpressionBuilder());
- return builder;
- }
-}
diff --git a/src/HotChocolate/Core/src/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Relay.cs b/src/HotChocolate/Core/src/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Relay.cs
index 2e73c5a5110..0871a71ea7c 100644
--- a/src/HotChocolate/Core/src/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Relay.cs
+++ b/src/HotChocolate/Core/src/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Relay.cs
@@ -8,25 +8,6 @@ namespace Microsoft.Extensions.DependencyInjection;
public static partial class SchemaRequestExecutorBuilderExtensions
{
- ///
- /// Enables relay schema style.
- ///
- ///
- /// The .
- ///
- ///
- /// The relay schema options.
- ///
- ///
- /// An that can be used to configure a schema
- /// and its execution.
- ///
- [Obsolete("Use AddGlobalObjectIdentification / AddQueryFieldToMutationPayloads")]
- public static IRequestExecutorBuilder EnableRelaySupport(
- this IRequestExecutorBuilder builder,
- RelayOptions? options = null) =>
- builder.ConfigureSchema(c => c.EnableRelaySupport(options));
-
///
/// Adds a node field to the root query according to the
/// Global Object Identification specification.
diff --git a/src/HotChocolate/Core/src/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Types.cs b/src/HotChocolate/Core/src/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Types.cs
index dd16f5382fe..05b2da3ae76 100644
--- a/src/HotChocolate/Core/src/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Types.cs
+++ b/src/HotChocolate/Core/src/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Types.cs
@@ -1541,12 +1541,6 @@ public static IRequestExecutorBuilder AddTypeExtension(
return builder.ConfigureSchema(b => b.AddType());
}
- [Obsolete("Use BindRuntimeType")]
- public static IRequestExecutorBuilder BindClrType(
- this IRequestExecutorBuilder builder)
- where TSchemaType : INamedType =>
- BindRuntimeType(builder);
-
public static IRequestExecutorBuilder BindRuntimeType(
this IRequestExecutorBuilder builder)
where TSchemaType : INamedType
@@ -1559,13 +1553,6 @@ public static IRequestExecutorBuilder BindRuntimeType
return builder.ConfigureSchema(b => b.BindRuntimeType());
}
- [Obsolete("Use BindRuntimeType")]
- public static IRequestExecutorBuilder BindClrType(
- this IRequestExecutorBuilder builder,
- Type runtimeType,
- Type schemaType) =>
- BindRuntimeType(builder, runtimeType, schemaType);
-
public static IRequestExecutorBuilder BindRuntimeType(
this IRequestExecutorBuilder builder,
Type runtimeType,
diff --git a/src/HotChocolate/Core/src/Execution/Instrumentation/DiagnosticEventListener.cs b/src/HotChocolate/Core/src/Execution/Instrumentation/DiagnosticEventListener.cs
deleted file mode 100644
index 43aee87ae70..00000000000
--- a/src/HotChocolate/Core/src/Execution/Instrumentation/DiagnosticEventListener.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-
-namespace HotChocolate.Execution.Instrumentation;
-
-[Obsolete("Use ExecutionDiagnosticEventListener")]
-public class DiagnosticEventListener
- : ExecutionDiagnosticEventListener
- , IDiagnosticEventListener
-{
-
-}
diff --git a/src/HotChocolate/Core/src/Execution/Instrumentation/IDiagnosticEventListener.cs b/src/HotChocolate/Core/src/Execution/Instrumentation/IDiagnosticEventListener.cs
deleted file mode 100644
index ed3c940d341..00000000000
--- a/src/HotChocolate/Core/src/Execution/Instrumentation/IDiagnosticEventListener.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-
-namespace HotChocolate.Execution.Instrumentation;
-
-///
-/// Register an implementation of this interface in the DI container to
-/// listen to diagnostic events. Multiple implementations can be registered
-/// and they will all be called in the registration order.
-///
-///
-[Obsolete("Use IExecutionDiagnosticEventListener")]
-public interface IDiagnosticEventListener
- : IExecutionDiagnosticEventListener
- , IDiagnosticEvents
-{
-
-}
diff --git a/src/HotChocolate/Core/src/Execution/Instrumentation/IDiagnosticEvents.cs b/src/HotChocolate/Core/src/Execution/Instrumentation/IDiagnosticEvents.cs
deleted file mode 100644
index 753f7f0421b..00000000000
--- a/src/HotChocolate/Core/src/Execution/Instrumentation/IDiagnosticEvents.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-
-namespace HotChocolate.Execution.Instrumentation;
-
-///
-/// Diagnostic events that can be triggered by the execution engine.
-///
-///
-[Obsolete("Use IExecutionDiagnosticEvents")]
-public interface IDiagnosticEvents : IExecutionDiagnosticEvents
-{
-
-}
diff --git a/src/HotChocolate/Core/src/Execution/Processing/MiddlewareContext.Selection.cs b/src/HotChocolate/Core/src/Execution/Processing/MiddlewareContext.Selection.cs
index 3252e32ee55..3173643c706 100644
--- a/src/HotChocolate/Core/src/Execution/Processing/MiddlewareContext.Selection.cs
+++ b/src/HotChocolate/Core/src/Execution/Processing/MiddlewareContext.Selection.cs
@@ -15,9 +15,6 @@ internal partial class MiddlewareContext
public IObjectField Field => _selection.Field;
- [Obsolete("Use Selection.SyntaxNode.")]
- public FieldNode FieldSelection => _selection.SyntaxNode;
-
public ISelection Selection => _selection;
public string ResponseName => _selection.ResponseName;
diff --git a/src/HotChocolate/Core/src/Fetching/Extensions/DataLoaderResolverContextExtensions.cs b/src/HotChocolate/Core/src/Fetching/Extensions/DataLoaderResolverContextExtensions.cs
index 8234d813f7c..5da3b4ee543 100644
--- a/src/HotChocolate/Core/src/Fetching/Extensions/DataLoaderResolverContextExtensions.cs
+++ b/src/HotChocolate/Core/src/Fetching/Extensions/DataLoaderResolverContextExtensions.cs
@@ -89,38 +89,6 @@ FetchBatchDataLoader Loader()
: reg.GetOrRegister(dataLoaderName, Loader);
}
- ///
- /// Creates a new batch DataLoader with the specified logic.
- ///
- ///
- /// The resolver context.
- ///
- ///
- /// The optional DataLoader name.
- ///
- ///
- /// The batch fetch logic.
- ///
- ///
- /// Returns the DataLoader.
- ///
- [Obsolete]
- public static IDataLoader BatchDataLoader(
- this IResolverContext context,
- string dataLoaderName,
- FetchBatch fetch)
- where TKey : notnull
- {
- if (string.IsNullOrEmpty(dataLoaderName))
- {
- throw new ArgumentException(
- DataLoaderRegistry_KeyNullOrEmpty,
- nameof(dataLoaderName));
- }
-
- return BatchDataLoader(context, fetch, dataLoaderName);
- }
-
///
/// This utility methods creates a new
/// with the provided logic and invoked the
@@ -195,38 +163,6 @@ FetchGroupedDataLoader Loader()
: reg.GetOrRegister(dataLoaderName, Loader);
}
- ///
- /// Creates a new GroupDataLoader with the specified logic.
- ///
- ///
- /// The resolver context.
- ///
- ///
- /// The optional DataLoader name.
- ///
- ///
- /// The batch fetch logic for the GroupDataLoader.
- ///
- ///
- /// Returns the DataLoader.
- ///
- [Obsolete]
- public static IDataLoader GroupDataLoader(
- this IResolverContext context,
- string dataLoaderName,
- FetchGroup fetch)
- where TKey : notnull
- {
- if (string.IsNullOrEmpty(dataLoaderName))
- {
- throw new ArgumentException(
- DataLoaderRegistry_KeyNullOrEmpty,
- nameof(dataLoaderName));
- }
-
- return GroupDataLoader(context, fetch, dataLoaderName);
- }
-
///
/// This utility methods creates a new
/// with the provided logic and invoked the
@@ -285,23 +221,6 @@ FetchCacheDataLoader Loader()
: reg.GetOrRegister(key, Loader);
}
- [Obsolete]
- public static IDataLoader CacheDataLoader(
- this IResolverContext context,
- string key,
- FetchCache fetch)
- where TKey : notnull
- {
- if (string.IsNullOrEmpty(key))
- {
- throw new ArgumentException(
- DataLoaderRegistry_KeyNullOrEmpty,
- nameof(key));
- }
-
- return CacheDataLoader(context, fetch, key);
- }
-
public static Task CacheAsync(
this IResolverContext context,
Func> fetch,
@@ -330,22 +249,6 @@ public static Task FetchOnceAsync(
.LoadAsync("default", context.RequestAborted);
}
- [Obsolete]
- public static Task FetchOnceAsync(
- this IResolverContext context,
- string key,
- Func> fetch)
- {
- if (string.IsNullOrEmpty(key))
- {
- throw new ArgumentException(
- DataLoaderRegistry_KeyNullOrEmpty,
- nameof(key));
- }
-
- return FetchOnceAsync(context, fetch, key);
- }
-
[GetDataLoader]
public static T DataLoader(this IResolverContext context)
where T : IDataLoader
diff --git a/src/HotChocolate/Core/src/Types.CursorPagination/EdgeType.cs b/src/HotChocolate/Core/src/Types.CursorPagination/EdgeType.cs
index 5c226f395c6..0976b3e2ceb 100644
--- a/src/HotChocolate/Core/src/Types.CursorPagination/EdgeType.cs
+++ b/src/HotChocolate/Core/src/Types.CursorPagination/EdgeType.cs
@@ -72,10 +72,6 @@ internal EdgeType(TypeReference nodeType)
///
public IOutputType NodeType { get; private set; } = default!;
- ///
- [Obsolete("Use NodeType.")]
- public IOutputType EntityType => NodeType;
-
///
public override bool IsInstanceOfType(IResolverContext context, object resolverResult)
{
diff --git a/src/HotChocolate/Core/src/Types.CursorPagination/Extensions/UsePagingAttribute.cs b/src/HotChocolate/Core/src/Types.CursorPagination/Extensions/UsePagingAttribute.cs
index 42bbc6c97bc..477d98276bf 100644
--- a/src/HotChocolate/Core/src/Types.CursorPagination/Extensions/UsePagingAttribute.cs
+++ b/src/HotChocolate/Core/src/Types.CursorPagination/Extensions/UsePagingAttribute.cs
@@ -35,18 +35,6 @@ public UsePagingAttribute(Type? type = null, [CallerLineNumber] int order = 0)
Order = order;
}
- ///
- /// The schema type representation of the node type.
- ///
-
- public Type? SchemaType
- {
- [Obsolete("Use Type.")]
- get => Type;
- [Obsolete("Use the new constructor.")]
- set => Type = value;
- }
-
///
/// The schema type representation of the node type.
///
diff --git a/src/HotChocolate/Core/src/Types.CursorPagination/IEdgeType.cs b/src/HotChocolate/Core/src/Types.CursorPagination/IEdgeType.cs
index 12b305c38a0..d70c84b52fd 100644
--- a/src/HotChocolate/Core/src/Types.CursorPagination/IEdgeType.cs
+++ b/src/HotChocolate/Core/src/Types.CursorPagination/IEdgeType.cs
@@ -16,10 +16,4 @@ public interface IEdgeType : IObjectType
/// Gets the item type of the node field on the edge type.
///
IOutputType NodeType { get; }
-
- ///
- /// Gets the item type of the node field on the edge type.
- ///
- [Obsolete("Use NodeType.")]
- IOutputType EntityType { get; }
}
diff --git a/src/HotChocolate/Core/src/Types/Contracts/ISchemaBuilder.cs b/src/HotChocolate/Core/src/Types/Contracts/ISchemaBuilder.cs
index d2f077a0fc1..01dee23d711 100644
--- a/src/HotChocolate/Core/src/Types/Contracts/ISchemaBuilder.cs
+++ b/src/HotChocolate/Core/src/Types/Contracts/ISchemaBuilder.cs
@@ -80,19 +80,6 @@ public interface ISchemaBuilder
///
ISchemaBuilder AddType(INamedTypeExtension typeExtension);
- ///
- /// Binds a .NET runtime type to a GraphQL schema type.
- ///
- ///
- /// The .NET runtime type.
- ///
- ///
- /// The GraphQL schema type.
- ///
- ///
- [Obsolete("Use BindRuntimeType")]
- ISchemaBuilder BindClrType(Type clrType, Type schemaType);
-
///
/// Binds a .NET runtime type to a GraphQL schema type.
///
diff --git a/src/HotChocolate/Core/src/Types/Extensions/ResolverContextExtensions.cs b/src/HotChocolate/Core/src/Types/Extensions/ResolverContextExtensions.cs
index dd12e15dd2d..273b7e6d9db 100644
--- a/src/HotChocolate/Core/src/Types/Extensions/ResolverContextExtensions.cs
+++ b/src/HotChocolate/Core/src/Types/Extensions/ResolverContextExtensions.cs
@@ -10,12 +10,6 @@ namespace HotChocolate;
public static class ResolverContextExtensions
{
- [Obsolete("Use `GetGlobalStateOrDefault`")]
- public static T? GetGlobalValue(
- this IResolverContext context,
- string name)
- => GetGlobalStateOrDefault(context, name);
-
///
/// Gets the global state for the specified ,
/// or a default value if the state could not be resolved.
@@ -92,12 +86,6 @@ public static class ResolverContextExtensions
string.Format(ResolverContextExtensions_ContextData_KeyNotFound, name));
}
- [Obsolete("Use `GetScopedStateOrDefault`")]
- public static T? GetScopedValue(
- this IResolverContext context,
- string name)
- => GetScopedStateOrDefault(context, name);
-
///
/// Gets the scoped state for the specified ,
/// or a default value if the state could not be resolved.
@@ -174,12 +162,6 @@ public static class ResolverContextExtensions
string.Format(ResolverContextExtensions_ScopedContextData_KeyNotFound, name));
}
- [Obsolete("Use `GetLocalStateOrDefault`")]
- public static T? GetLocalValue(
- this IResolverContext context,
- string name)
- => GetLocalStateOrDefault(context, name);
-
///
/// Gets the local state for the specified ,
/// or a default value if the state could not be resolved.
@@ -256,13 +238,6 @@ public static class ResolverContextExtensions
string.Format(ResolverContextExtensions_LocalContextData_KeyNotFound, name));
}
- [Obsolete("Use `SetGlobalState`")]
- public static void SetGlobalValue(
- this IResolverContext context,
- string name,
- T value)
- => SetGlobalState(context, name, value);
-
///
/// Sets the global state for
/// to the specified .
@@ -291,13 +266,6 @@ public static void SetGlobalState(
context.ContextData[name] = value;
}
- [Obsolete("Use `SetScopedState`")]
- public static void SetScopedValue(
- this IResolverContext context,
- string name,
- T value)
- => SetScopedState(context, name, value);
-
///
/// Sets the scoped state for
/// to the specified .
@@ -326,13 +294,6 @@ public static void SetScopedState(
context.ScopedContextData = context.ScopedContextData.SetItem(name, value);
}
- [Obsolete("Use `SetLocalState`")]
- public static void SetLocalValue(
- this IResolverContext context,
- string name,
- T value)
- => SetLocalState(context, name, value);
-
///
/// Sets the local state for
/// to the specified .
@@ -361,13 +322,6 @@ public static void SetLocalState(
context.LocalContextData = context.LocalContextData.SetItem(name, value);
}
- [Obsolete("Use `GetOrSetGlobalState`")]
- public static T GetOrAddGlobalValue(
- this IResolverContext context,
- string name,
- Func createValue)
- => GetOrSetGlobalState(context, name, createValue);
-
///
/// Gets or sets the global state for the specified .
///
@@ -413,13 +367,6 @@ public static T GetOrSetGlobalState(
return newValue;
}
- [Obsolete("Use `GetOrSetScopedState`")]
- public static T GetOrAddScopedValue(
- this IResolverContext context,
- string name,
- Func createValue)
- => GetOrSetScopedState(context, name, createValue);
-
///
/// Gets or sets the scoped state for the specified .
///
@@ -465,13 +412,6 @@ public static T GetOrSetScopedState(
return newValue;
}
- [Obsolete("Use `GetOrSetLocalState`")]
- public static T GetOrAddLocalValue(
- this IResolverContext context,
- string name,
- Func createValue)
- => GetOrSetLocalState(context, name, createValue);
-
///
/// Gets or sets the local state for the specified .
///
@@ -517,30 +457,6 @@ public static T GetOrSetLocalState(
return newValue;
}
- [Obsolete]
- public static void RemoveGlobalValue(
- this IResolverContext context,
- string name)
- {
- if (context is null)
- {
- throw new ArgumentNullException(nameof(context));
- }
-
- if (string.IsNullOrEmpty(name))
- {
- throw String_NullOrEmpty(nameof(name));
- }
-
- context.ContextData.Remove(name);
- }
-
- [Obsolete("Use `RemoveScopedState`")]
- public static void RemoveScopedValue(
- this IResolverContext context,
- string name)
- => RemoveScopedState(context, name);
-
///
/// Removes the scoped state set for the specified .
///
@@ -563,12 +479,6 @@ public static void RemoveScopedState(
context.ScopedContextData = context.ScopedContextData.Remove(name);
}
- [Obsolete("Use `RemoveLocalState`")]
- public static void RemoveLocalValue(
- this IResolverContext context,
- string name)
- => RemoveLocalState(context, name);
-
///
/// Removes the local state set for the specified .
///
diff --git a/src/HotChocolate/Core/src/Types/SchemaBuilder.cs b/src/HotChocolate/Core/src/Types/SchemaBuilder.cs
index adf143be404..bf5e431264d 100644
--- a/src/HotChocolate/Core/src/Types/SchemaBuilder.cs
+++ b/src/HotChocolate/Core/src/Types/SchemaBuilder.cs
@@ -210,11 +210,6 @@ public ISchemaBuilder AddConvention(
return this;
}
- ///
- [Obsolete]
- public ISchemaBuilder BindClrType(Type clrType, Type schemaType)
- => BindRuntimeType(clrType, schemaType);
-
///
public ISchemaBuilder BindRuntimeType(Type runtimeType, Type schemaType)
{
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IDirectiveTypeDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IDirectiveTypeDescriptor.cs
index a36101ac4b7..71715f4c948 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IDirectiveTypeDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IDirectiveTypeDescriptor.cs
@@ -49,18 +49,6 @@ IDirectiveTypeDescriptor SyntaxNode(
/// The directive location.
IDirectiveTypeDescriptor Location(DirectiveLocation value);
- [Obsolete("Replace Middleware with `Use`.")]
- IDirectiveTypeDescriptor Middleware(
- DirectiveMiddleware middleware);
-
- [Obsolete("Replace Middleware with `Use`.", true)]
- IDirectiveTypeDescriptor Middleware(
- Expression> method);
-
- [Obsolete("Replace Middleware with `Use`.", true)]
- IDirectiveTypeDescriptor Middleware(
- Expression> method);
-
///
/// Configure a middleware for this directive.
///
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IDirectiveTypeDescriptor~1.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IDirectiveTypeDescriptor~1.cs
index 65566eaa1af..7d03223f167 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IDirectiveTypeDescriptor~1.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IDirectiveTypeDescriptor~1.cs
@@ -89,18 +89,6 @@ IDirectiveArgumentDescriptor Argument(
/// The directive location.
IDirectiveTypeDescriptor Location(DirectiveLocation value);
- [Obsolete("Use `Use(DirectiveMiddleware)`.")]
- IDirectiveTypeDescriptor Middleware(
- DirectiveMiddleware middleware);
-
- [Obsolete("Use `Use(DirectiveMiddleware)`.")]
- IDirectiveTypeDescriptor Middleware(
- Expression> method);
-
- [Obsolete("Use `Use(DirectiveMiddleware)`.")]
- IDirectiveTypeDescriptor Middleware(
- Expression> method);
-
///
/// Configure a middleware for this directive.
///
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 588e5fc0d6d..dd057f2d19b 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor.cs
@@ -38,15 +38,6 @@ 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);
-
///
/// Defines a value that should be included on the enum type.
///
@@ -55,15 +46,6 @@ 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.
///
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor~1.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor~1.cs
index d03a6a1528a..560f1c5e73e 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor~1.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumTypeDescriptor~1.cs
@@ -41,15 +41,6 @@ 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(TRuntimeType value);
-
///
/// Defines a value that should be included on the enum type.
///
@@ -58,15 +49,6 @@ IEnumTypeDescriptor SyntaxNode(
///
IEnumValueDescriptor Value(TRuntimeType 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.
///
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumValueDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumValueDescriptor.cs
index 205c2a850a9..5951309b82a 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumValueDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IEnumValueDescriptor.cs
@@ -29,13 +29,6 @@ IEnumValueDescriptor SyntaxNode(
/// The enum value description.
IEnumValueDescriptor Description(string value);
- ///
- /// Specifies a deprecation reason for this enum value.
- ///
- /// The reason why this enum value is deprecated.
- [Obsolete("Use `Deprecated`.")]
- IEnumValueDescriptor DeprecationReason(string reason);
-
///
/// Deprecates the enum value.
///
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceFieldDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceFieldDescriptor.cs
index 5e9c36b6a84..f6a6892cbb2 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceFieldDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceFieldDescriptor.cs
@@ -15,10 +15,6 @@ IInterfaceFieldDescriptor SyntaxNode(
IInterfaceFieldDescriptor Description(string value);
- [Obsolete("Use `Deprecated`.")]
- IInterfaceFieldDescriptor DeprecationReason(
- string reason);
-
IInterfaceFieldDescriptor Deprecated(string reason);
IInterfaceFieldDescriptor Deprecated();
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceTypeDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceTypeDescriptor.cs
index c524b9c2914..ed04d6ded4e 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceTypeDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceTypeDescriptor.cs
@@ -36,34 +36,6 @@ IInterfaceTypeDescriptor SyntaxNode(
/// The interface type description.
IInterfaceTypeDescriptor Description(string value);
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- /// The interface type.
- [Obsolete("Use Implements.")]
- IInterfaceTypeDescriptor Interface()
- where T : InterfaceType;
-
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- /// The interface type.
- [Obsolete("Use Implements.")]
- IInterfaceTypeDescriptor Interface(T type)
- where T : InterfaceType;
-
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- ///
- /// A syntax node representing an interface type.
- ///
- [Obsolete("Use Implements.")]
- IInterfaceTypeDescriptor Interface(NamedTypeNode type);
-
///
/// Specifies an interface that is implemented by the
/// .
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceTypeDescriptor~1.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceTypeDescriptor~1.cs
index 74462007bda..19227b9222c 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceTypeDescriptor~1.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IInterfaceTypeDescriptor~1.cs
@@ -37,34 +37,6 @@ IInterfaceTypeDescriptor SyntaxNode(
/// The interface type description.
IInterfaceTypeDescriptor Description(string value);
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- /// The interface that is being implemented.
- [Obsolete("Use Implements.")]
- IInterfaceTypeDescriptor Interface()
- where TInterface : InterfaceType;
-
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- /// The interface that is being implemented.
- [Obsolete("Use Implements.")]
- IInterfaceTypeDescriptor Interface(TInterface type)
- where TInterface : InterfaceType;
-
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- ///
- /// A syntax node representing an interface type.
- ///
- [Obsolete("Use Implements.")]
- IInterfaceTypeDescriptor Interface(NamedTypeNode type);
-
///
/// Specifies an interface that is implemented by the
/// .
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectFieldDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectFieldDescriptor.cs
index 919d45faf60..4e23dfa3a81 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectFieldDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectFieldDescriptor.cs
@@ -43,13 +43,6 @@ public interface IObjectFieldDescriptor
/// The object field description.
IObjectFieldDescriptor Description(string? value);
- ///
- /// Specifies a deprecation reason for this field.
- ///
- /// The reason why this field is deprecated.
- [Obsolete("Use `Deprecated`.")]
- IObjectFieldDescriptor DeprecationReason(string? reason);
-
///
/// Deprecates the object field.
///
@@ -120,74 +113,6 @@ IObjectFieldDescriptor Argument(
///
IObjectFieldDescriptor Ignore(bool ignore = true);
- ///
- /// Adds a resolver to the field. A resolver is a method that resolves the value for a
- /// field. The resolver can access parent object, arguments, services and more through the
- /// .
- ///
- /// The resolver of the field
- ///
- /// Resolver accessing the parent
- ///
- /// x.Foo)
- /// .Resolve(context => context.Parent().Foo);
- /// ]]>
- ///
- /// Resolver with static value
- ///
- /// x.Foo)
- /// .Resolve("Static Value");
- /// ]]>
- ///
- /// Resolver accessing service
- ///
- /// x.Foo)
- /// .Resolve(context => context.Service().GetFoo());
- /// ]]>
- ///
- /// Resolver accessing argument
- ///
- /// x.Foo)
- /// .Argument("arg1", x => x.Type())
- /// .Resolve(context => context.ArgumentValue("arg1"));
- /// ]]>
- ///
- ///
- ///
- [Obsolete("Use Resolve(...)")]
- IObjectFieldDescriptor Resolver(FieldResolverDelegate fieldResolver);
-
- ///
- /// Adds a resolver to the field. A resolver is a method that resolves the value for a
- /// field. The resolver can access parent object, arguments, services and more through the
- /// .
- ///
- /// The resolver of the field
- /// The result type of the resolver
- ///
- /// Resolver accessing the parent
- ///
- /// x.Foo)
- /// .Resolve(context => context.Parent().Foo, typeof(string));
- /// ]]>
- ///
- ///
- ///
- [Obsolete("Use Resolve(...)")]
- IObjectFieldDescriptor Resolver(
- FieldResolverDelegate fieldResolver,
- Type resultType);
-
///
/// Adds a resolver to the field. A resolver is a method that resolves the value for a
/// field. The resolver can access parent object, arguments, services and more through the
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectTypeDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectTypeDescriptor.cs
index 5220b904a30..63a67316f9f 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectTypeDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectTypeDescriptor.cs
@@ -42,34 +42,6 @@ IObjectTypeDescriptor SyntaxNode(
/// The object type description.
IObjectTypeDescriptor Description(string? value);
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- /// The interface type.
- [Obsolete("Use Implements.")]
- IObjectTypeDescriptor Interface()
- where T : InterfaceType;
-
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- /// The interface type.
- [Obsolete("Use Implements.")]
- IObjectTypeDescriptor Interface(T type)
- where T : InterfaceType;
-
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- ///
- /// A syntax node representing an interface type.
- ///
- [Obsolete("Use Implements.")]
- IObjectTypeDescriptor Interface(NamedTypeNode type);
-
///
/// Specifies an interface that is implemented by the
/// .
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectTypeDescriptor~1.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectTypeDescriptor~1.cs
index 4f6cdd3317f..a959a3bae2f 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectTypeDescriptor~1.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Contracts/IObjectTypeDescriptor~1.cs
@@ -75,34 +75,6 @@ public interface IObjectTypeDescriptor
///
IObjectTypeDescriptor BindFieldsImplicitly();
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- /// The interface type.
- [Obsolete("Use Implements.")]
- IObjectTypeDescriptor Interface()
- where TInterface : InterfaceType;
-
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- /// The interface type.
- [Obsolete("Use Implements.")]
- IObjectTypeDescriptor Interface(TInterface type)
- where TInterface : InterfaceType;
-
- ///
- /// Specifies an interface that is implemented by the
- /// .
- ///
- ///
- /// A syntax node representing an interface type.
- ///
- [Obsolete("Use Implements.")]
- IObjectTypeDescriptor Interface(NamedTypeNode type);
-
///
/// Specifies an interface that is implemented by the
/// .
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/DirectiveTypeDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/DirectiveTypeDescriptor.cs
index e3715609d4d..367fd607982 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/DirectiveTypeDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/DirectiveTypeDescriptor.cs
@@ -158,29 +158,6 @@ public IDirectiveTypeDescriptor Use(
return Use(DirectiveClassMiddlewareFactory.Create(factory));
}
- [Obsolete("Replace Middleware with `Use`.")]
- public IDirectiveTypeDescriptor Middleware(
- DirectiveMiddleware middleware)
- {
- return Use(middleware);
- }
-
- [Obsolete("Replace Middleware with `Use`.", true)]
- public IDirectiveTypeDescriptor Middleware(
- Expression> method)
- {
- throw new NotSupportedException(
- TypeResources.DirectiveType_ReplaceWithUse);
- }
-
- [Obsolete("Replace Middleware with `Use`.", true)]
- public IDirectiveTypeDescriptor Middleware(
- Expression> method)
- {
- throw new NotSupportedException(
- TypeResources.DirectiveType_ReplaceWithUse);
- }
-
public IDirectiveTypeDescriptor Repeatable()
{
Definition.IsRepeatable = true;
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/DirectiveTypeDescriptor~1.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/DirectiveTypeDescriptor~1.cs
index 1f5616f89d1..26f9d829675 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/DirectiveTypeDescriptor~1.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/DirectiveTypeDescriptor~1.cs
@@ -139,30 +139,6 @@ public IDirectiveArgumentDescriptor Argument(
return this;
}
- [Obsolete("Replace Middleware with `Use`.")]
- public new IDirectiveTypeDescriptor Middleware(
- DirectiveMiddleware middleware)
- {
- base.Middleware(middleware);
- return this;
- }
-
- [Obsolete("Replace Middleware with `Use`.", true)]
- public new IDirectiveTypeDescriptor Middleware(
- Expression> method)
- {
- base.Middleware(method);
- return this;
- }
-
- [Obsolete("Replace Middleware with `Use`.", true)]
- public new IDirectiveTypeDescriptor Middleware(
- Expression> method)
- {
- base.Middleware(method);
- return this;
- }
-
public new IDirectiveTypeDescriptor Repeatable()
{
base.Repeatable();
diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/EnumTypeDescriptor.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/EnumTypeDescriptor.cs
index 6eb93a3dd16..d89ed43422a 100644
--- a/src/HotChocolate/Core/src/Types/Types/Descriptors/EnumTypeDescriptor.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/EnumTypeDescriptor.cs
@@ -103,11 +103,6 @@ public IEnumTypeDescriptor Description(string value)
return this;
}
- [Obsolete("Use `BindValues`.")]
- public IEnumTypeDescriptor BindItems(
- BindingBehavior behavior) =>
- BindValues(behavior);
-
public IEnumTypeDescriptor BindValues(
BindingBehavior behavior)
{
@@ -133,9 +128,6 @@ public IEnumTypeDescriptor ValueComparer(IEqualityComparer
public interface INodeDescriptor : IDescriptor
{
- ///
- /// Specifies a delegate to resolve the node from its id.
- ///
- ///
- /// The delegate to resolve the node from its id.
- ///
- [Obsolete("Use ResolveNode.")]
- IObjectFieldDescriptor NodeResolver(
- NodeResolverDelegate nodeResolver);
-
///
/// Specifies a delegate to resolve the node from its id.
///
diff --git a/src/HotChocolate/Core/src/Types/Types/Relay/Extensions/NodeObjectTypeExtensions.cs b/src/HotChocolate/Core/src/Types/Types/Relay/Extensions/NodeObjectTypeExtensions.cs
index f3ba17a92ae..4003d48e917 100644
--- a/src/HotChocolate/Core/src/Types/Types/Relay/Extensions/NodeObjectTypeExtensions.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Relay/Extensions/NodeObjectTypeExtensions.cs
@@ -26,14 +26,4 @@ public static INodeDescriptor ImplementsNode(
return new NodeDescriptor(descriptor);
}
-
- [Obsolete("Use ImplementsNode.")]
- public static INodeDescriptor AsNode(
- this IObjectTypeDescriptor descriptor) =>
- ImplementsNode(descriptor);
-
- [Obsolete("Use ImplementsNode.")]
- public static INodeDescriptor AsNode(
- this IObjectTypeDescriptor descriptor) =>
- ImplementsNode(descriptor);
}
diff --git a/src/HotChocolate/Core/src/Types/Types/Relay/Extensions/RelaySchemaBuilderExtensions.cs b/src/HotChocolate/Core/src/Types/Types/Relay/Extensions/RelaySchemaBuilderExtensions.cs
index 511e80022a5..b17bfb907a6 100644
--- a/src/HotChocolate/Core/src/Types/Types/Relay/Extensions/RelaySchemaBuilderExtensions.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Relay/Extensions/RelaySchemaBuilderExtensions.cs
@@ -8,32 +8,6 @@ namespace HotChocolate;
public static class RelaySchemaBuilderExtensions
{
- ///
- /// Enables relay schema style.
- ///
- [Obsolete("Use AddGlobalObjectIdentification / AddQueryFieldToMutationPayloads")]
- public static ISchemaBuilder EnableRelaySupport(
- this ISchemaBuilder schemaBuilder,
- RelayOptions? options = null)
- {
- options ??= new();
-
- if (options.AddQueryFieldToMutationPayloads)
- {
- MutationPayloadOptions payloadOptions = new()
- {
- QueryFieldName = options.QueryFieldName,
- MutationPayloadPredicate = options.MutationPayloadPredicate
- };
-
- schemaBuilder.AddQueryFieldToMutationPayloads(payloadOptions);
- }
-
- return schemaBuilder
- .SetContextData(IsRelaySupportEnabled, 1)
- .AddGlobalObjectIdentification();
- }
-
///
/// Adds a node field to the root query according to the
/// Global Object Identification specification.
diff --git a/src/HotChocolate/Core/src/Types/Types/Relay/RelayOptions.cs b/src/HotChocolate/Core/src/Types/Types/Relay/RelayOptions.cs
deleted file mode 100644
index 28cbb8ebcea..00000000000
--- a/src/HotChocolate/Core/src/Types/Types/Relay/RelayOptions.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#nullable enable
-
-using System;
-
-namespace HotChocolate.Types.Relay;
-
-///
-/// Represents relay options.
-///
-[Obsolete]
-public class RelayOptions
-{
- ///
- /// If set to true the mutation payloads are rewritten to provide access to
- /// the query root type to allow better capabilities refetch data.
- ///
- public bool AddQueryFieldToMutationPayloads { get; set; }
-
- ///
- /// The name of the query field on a mutation payload (default: query).
- ///
- public string? QueryFieldName { get; set; }
-
- ///
- /// A predicate that defines if the query field shall be added to
- /// the specified payload type.
- ///
- public Func MutationPayloadPredicate { get; set; } =
- type => type.Name.EndsWith("Payload", StringComparison.Ordinal);
-}
diff --git a/src/HotChocolate/Core/test/Types.Tests/DataLoader/DataLoaderResolverContextExtensions.cs b/src/HotChocolate/Core/test/Types.Tests/DataLoader/DataLoaderResolverContextExtensions.cs
index 320b1b8fac0..e3d3ce6c255 100644
--- a/src/HotChocolate/Core/test/Types.Tests/DataLoader/DataLoaderResolverContextExtensions.cs
+++ b/src/HotChocolate/Core/test/Types.Tests/DataLoader/DataLoaderResolverContextExtensions.cs
@@ -29,44 +29,6 @@ public void BatchDataLoader_1_ContextNull_ArgNullException()
Assert.Throws(a);
}
- [Fact]
- [Obsolete]
- public void BatchDataLoader_2_ContextNull_ArgNullException()
- {
- // arrange
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .BatchDataLoader(
- null!,
- "abc",
- new FetchBatch((keys, ct) => Task
- .FromResult>(
- null)));
-
- // assert
- Assert.Throws(a);
- }
-
- [Fact]
- [Obsolete]
- public void BatchDataLoader_2_KeyNull_ArgNullException()
- {
- // arrange
- var resolverContext = new Mock();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .BatchDataLoader(
- resolverContext.Object,
- null,
- new FetchBatch((keys, ct) => Task
- .FromResult>(
- null)));
-
- // assert
- Assert.Throws(a);
- }
-
[Fact]
public void BatchDataLoader_1_FetchNull_ArgNullException()
{
@@ -84,24 +46,6 @@ public void BatchDataLoader_1_FetchNull_ArgNullException()
Assert.Throws(a);
}
- [Fact]
- [Obsolete]
- public void BatchDataLoader_2_FetchNull_ArgNullException()
- {
- // arrange
- var resolverContext = new Mock();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .BatchDataLoader(
- resolverContext.Object,
- "123",
- default(FetchBatch));
-
- // assert
- Assert.Throws(a);
- }
-
[Fact]
public void GroupDataLoader_1_ContextNull_ArgNullException()
{
@@ -120,45 +64,6 @@ public void GroupDataLoader_1_ContextNull_ArgNullException()
Assert.Throws(a);
}
- [Fact]
- [Obsolete]
- public void GroupDataLoader_2_ContextNull_ArgNullException()
- {
- // arrange
- var lookup = new Mock>();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .GroupDataLoader(
- null,
- "abc",
- new FetchGroup((keys, ct) =>
- Task.FromResult(lookup.Object)));
-
- // assert
- Assert.Throws(a);
- }
-
- [Fact]
- [Obsolete]
- public void GroupDataLoader_2_KeyNull_ArgNullException()
- {
- // arrange
- var resolverContext = new Mock();
- var lookup = new Mock>();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .GroupDataLoader(
- resolverContext.Object,
- null,
- new FetchGroup((keys, ct) =>
- Task.FromResult(lookup.Object)));
-
- // assert
- Assert.Throws(a);
- }
-
[Fact]
public void GroupDataLoader_1_FetchNull_ArgNullException()
{
@@ -176,24 +81,6 @@ public void GroupDataLoader_1_FetchNull_ArgNullException()
Assert.Throws(a);
}
- [Fact]
- [Obsolete]
- public void GroupDataLoader_2_FetchNull_ArgNullException()
- {
- // arrange
- var resolverContext = new Mock();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .GroupDataLoader(
- resolverContext.Object,
- "123",
- default(FetchGroup));
-
- // assert
- Assert.Throws(a);
- }
-
[Fact]
public void CacheDataLoader_1_ContextNull_ArgNullException()
{
@@ -210,42 +97,6 @@ public void CacheDataLoader_1_ContextNull_ArgNullException()
Assert.Throws(a);
}
- [Fact]
- [Obsolete]
- public void CacheDataLoader_2_ContextNull_ArgNullException()
- {
- // arrange
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .CacheDataLoader(
- null,
- "abc",
- new FetchCache((keys, ct) =>
- Task.FromResult(string.Empty)));
-
- // assert
- Assert.Throws(a);
- }
-
- [Fact]
- [Obsolete]
- public void CacheDataLoader_2_KeyNull_ArgNullException()
- {
- // arrange
- var resolverContext = new Mock();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .CacheDataLoader(
- resolverContext.Object,
- null,
- new FetchCache((keys, ct) =>
- Task.FromResult(string.Empty)));
-
- // assert
- Assert.Throws(a);
- }
-
[Fact]
public void CacheDataLoader_1_FetchNull_ArgNullException()
{
@@ -263,24 +114,6 @@ public void CacheDataLoader_1_FetchNull_ArgNullException()
Assert.Throws(a);
}
- [Fact]
- [Obsolete]
- public void CacheDataLoader_2_FetchNull_ArgNullException()
- {
- // arrange
- var resolverContext = new Mock();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .CacheDataLoader(
- resolverContext.Object,
- "123",
- default(FetchCache));
-
- // assert
- Assert.Throws(a);
- }
-
[Fact]
public void FetchOnceAsync_1_ContextNull_ArgNullException()
{
@@ -297,42 +130,6 @@ public void FetchOnceAsync_1_ContextNull_ArgNullException()
Assert.Throws(a);
}
- [Fact]
- [Obsolete]
- public void FetchOnceAsync_2_ContextNull_ArgNullException()
- {
- // arrange
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .FetchOnceAsync(
- null,
- "abc",
- new Func>(ct =>
- Task.FromResult(string.Empty)));
-
- // assert
- Assert.Throws(a);
- }
-
- [Fact]
- [Obsolete]
- public void FetchOnceAsync_2_KeyNull_ArgNullException()
- {
- // arrange
- var resolverContext = new Mock();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .FetchOnceAsync(
- resolverContext.Object,
- null,
- new Func>(ct =>
- Task.FromResult(string.Empty)));
-
- // assert
- Assert.Throws(a);
- }
-
[Fact]
public void FetchOnceAsync_1_FetchNull_ArgNullException()
{
@@ -349,22 +146,4 @@ public void FetchOnceAsync_1_FetchNull_ArgNullException()
// assert
Assert.Throws(a);
}
-
- [Fact]
- [Obsolete]
- public void FetchOnceAsync_2_FetchNull_ArgNullException()
- {
- // arrange
- var resolverContext = new Mock();
-
- // act
- Action a = () => DataLoaderResolverContextExtensions
- .FetchOnceAsync(
- resolverContext.Object,
- "123",
- default(Func>));
-
- // assert
- Assert.Throws(a);
- }
}
diff --git a/src/HotChocolate/Core/test/Types.Tests/Resolvers/CustomResolverCompilerTests.cs b/src/HotChocolate/Core/test/Types.Tests/Resolvers/CustomResolverCompilerTests.cs
index b29b816ef16..b69bbf84970 100644
--- a/src/HotChocolate/Core/test/Types.Tests/Resolvers/CustomResolverCompilerTests.cs
+++ b/src/HotChocolate/Core/test/Types.Tests/Resolvers/CustomResolverCompilerTests.cs
@@ -92,45 +92,6 @@ public async Task AddResolverService()
await executor.ExecuteAsync("{ sayHello }").MatchSnapshotAsync();
}
- [Fact]
- [Obsolete]
- public async Task AddWellKnownService()
- {
- Snapshot.FullName();
-
- await new ServiceCollection()
- .AddSingleton()
- .AddGraphQL()
- .AddQueryType()
- .ConfigureResolverCompiler(c =>
- {
- c.AddService();
- })
- .ExecuteRequestAsync("{ sayHello }")
- .MatchSnapshotAsync();
- }
-
- [Fact]
- [Obsolete]
- public async Task AddWellKnownState()
- {
- Snapshot.FullName();
-
- await new ServiceCollection()
- .AddGraphQL()
- .AddQueryType()
- .ConfigureResolverCompiler(c =>
- {
- c.AddParameter(ctx => (SayHelloState)ctx.ContextData["someState"]!);
- })
- .ExecuteRequestAsync(
- QueryRequestBuilder.New()
- .SetQuery("{ sayHello }")
- .AddGlobalState("someState", new SayHelloState("Hello"))
- .Create())
- .MatchSnapshotAsync();
- }
-
[Fact]
public async Task AddWellKnownState_New()
{
@@ -148,17 +109,6 @@ public async Task AddWellKnownState_New()
.MatchSnapshotAsync();
}
- [Fact]
- [Obsolete]
- public void AddParameterEnsureBuilderIsNotNull()
- {
- void Configure()
- => default(IResolverCompilerBuilder)!
- .AddParameter(ctx => ctx.Operation.Document);
-
- Assert.Throws(Configure);
- }
-
[Fact]
public void AddParameterEnsureBuilderIsNotNull_New()
{
@@ -169,50 +119,6 @@ void Configure()
Assert.Throws(Configure);
}
- [Fact]
- [Obsolete]
- public void AddParameterEnsureExpressionIsNotNull()
- {
- var mock = new Mock();
-
- void Configure()
- => mock.Object.AddParameter(null!);
-
- Assert.Throws(Configure);
- }
-
- [Fact]
- [Obsolete]
- public void AddServiceEnsureBuilderIsNotNull()
- {
- void Configure()
- => default(IResolverCompilerBuilder)!
- .AddService();
-
- Assert.Throws(Configure);
- }
-
- [Fact]
- [Obsolete]
- public void EnsureRequestExecutorBuilderIsNotNull()
- {
- void Configure()
- => default(IRequestExecutorBuilder)!.ConfigureResolverCompiler(_ => { });
-
- Assert.Throws(Configure);
- }
-
- [Fact]
- [Obsolete]
- public void EnsureConfigureIsNotNull()
- {
- var mock = new Mock();
-
- void Configure() => mock.Object.ConfigureResolverCompiler(null!);
-
- Assert.Throws(Configure);
- }
-
public class SayHelloService
{
public string SayHello() => "Hello";
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Descriptors/ResolverObjectFieldDescriptorExtensionsTests.cs b/src/HotChocolate/Core/test/Types.Tests/Types/Descriptors/ResolverObjectFieldDescriptorExtensionsTests.cs
deleted file mode 100644
index a4b6daeb6b0..00000000000
--- a/src/HotChocolate/Core/test/Types.Tests/Types/Descriptors/ResolverObjectFieldDescriptorExtensionsTests.cs
+++ /dev/null
@@ -1,398 +0,0 @@
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using HotChocolate.Resolvers;
-using Moq;
-using Xunit;
-
-namespace HotChocolate.Types.Descriptors;
-
-[Obsolete]
-public class ResolverObjectFieldDescriptorExtensionsTests
-{
- [Fact]
- public void Resolver_IResolverContextObject_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() =>
- ResolverObjectFieldDescriptorExtensions.Resolver(
- null!, _ => new object());
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextObject_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public async Task Resolver_IResolverContextObject_ResolverIsSet()
- {
- // arrange
- FieldResolverDelegate resolver = null;
- var resolverFunc = new Func(_ => "foo");
- var descriptor = new Mock(MockBehavior.Strict);
- descriptor.Setup(t => t.Resolve(It.IsAny()))
- .Returns(
- new Func(
- r =>
- {
- resolver = r;
- return descriptor.Object;
- }));
-
- // act
- ResolverObjectFieldDescriptorExtensions.Resolver(descriptor.Object, resolverFunc);
-
- // assert
- Assert.Equal("foo", await resolver.Invoke(
- new Mock().Object));
- }
-
- [Fact]
- public void Resolver_IResolverContextTaskOfObject_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- _ => Task.FromResult(new object()));
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextTaskOfObject_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func>)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextT_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- _ => new object());
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextT_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextTaskOfT_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- _ => Task.FromResult(new object()));
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextTaskOfT_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func>)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_Object_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- () => new object());
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_Object_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_TaskOfObject_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- () => Task.FromResult(new object()));
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_TaskOfObject_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func>)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_T_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- () => new object());
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_T_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_TaskOfT_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- () => Task.FromResult(new object()));
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_TaskOfT_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func>)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextCtObject_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- (_, _) => new object());
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextCtObject_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextCtTaskOfObject_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- (_, _) => Task.FromResult(new object()));
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverCtxCtTaskOfObject_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func>)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextCtT_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- (_, _) => new object());
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextCtT_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverContextCtTaskOfT_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- (_, _) => Task.FromResult(new object()));
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_IResolverCtxCtTaskOfT_ResolverNull_ArgExc()
- {
- // arrange
- var descriptor = new Mock();
-
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- descriptor.Object,
- default(Func>)!);
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_Constant_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver(
- null!,
- new object());
-
- // assert
- Assert.Throws(Action);
- }
-
- [Fact]
- public void Resolver_ConstantT_DescNull_ArgExc()
- {
- // arrange
- // act
- void Action() => ResolverObjectFieldDescriptorExtensions.Resolver