Skip to content

Commit

Permalink
Remove obsolete APIs (#6657)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-tengler authored Nov 2, 2023
1 parent 14ad505 commit 4680c84
Show file tree
Hide file tree
Showing 72 changed files with 184 additions and 2,626 deletions.
12 changes: 0 additions & 12 deletions .build/Build.Tests.2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand All @@ -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"));
Expand All @@ -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"));
Expand Down
3 changes: 0 additions & 3 deletions .build/Build.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,14 @@ partial class Build
TestHotChocolateCore,
TestHotChocolateData,
TestHotChocolateDiagnostics,
TestHotChocolateFilters,
TestHotChocolateFusion,
TestHotChocolateLanguage,
TestHotChocolateMarten,
TestHotChocolateMongoDb,
TestHotChocolateNeo4J,
TestHotChocolatePersistedQueries,
TestHotChocolateRaven,
TestHotChocolateSkimmed,
TestHotChocolateSpatial,
TestHotChocolateStitching,
TestHotChocolateUtilities,
TestStrawberryShakeClient,
TestStrawberryShakeCodeGeneration,
Expand Down
154 changes: 0 additions & 154 deletions API-Baselines.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -131,54 +131,6 @@ public static IRequestExecutorBuilder AddGraphQLServer(
string? schemaName = default) =>
builder.Services.AddGraphQLServer(schemaName);

[Obsolete(
"Use the new configuration API -> " +
"services.AddGraphQLServer().AddQueryType<Query>()...")]
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<Query>()...")]
public static IServiceCollection AddGraphQL(
this IServiceCollection services,
Func<IServiceProvider, ISchema> schemaFactory,
int maxAllowedRequestSize = MaxAllowedRequestSize) =>
RequestExecutorBuilderLegacyHelper.SetSchema(
services
.AddGraphQLServerCore(maxAllowedRequestSize)
.AddGraphQL()
.AddDefaultHttpRequestInterceptor()
.AddSubscriptionServices(),
schemaFactory)
.Services;

[Obsolete(
"Use the new configuration API -> " +
"services.AddGraphQLServer().AddQueryType<Query>()...")]
public static IServiceCollection AddGraphQL(
this IServiceCollection services,
ISchemaBuilder schemaBuilder,
int maxAllowedRequestSize = MaxAllowedRequestSize) =>
RequestExecutorBuilderLegacyHelper.SetSchemaBuilder(
services
.AddGraphQLServerCore(maxAllowedRequestSize)
.AddGraphQL()
.AddDefaultHttpRequestInterceptor()
.AddSubscriptionServices(),
schemaBuilder)
.Services;

/// <summary>
/// Registers the GraphQL Upload Scalar.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ IQueryRequestBuilder TryAddVariableValue(
IQueryRequestBuilder SetVariableValue(
string name, object? value);

[Obsolete("Use `InitializeGlobalState`")]
IQueryRequestBuilder SetProperties(
Dictionary<string, object?>? properties);

/// <summary>
/// Initializes the global state of the request to the given
/// <paramref name="initialState" />.
Expand All @@ -54,10 +50,6 @@ IQueryRequestBuilder SetProperties(
IQueryRequestBuilder InitializeGlobalState(
Dictionary<string, object?>? initialState);

[Obsolete("Use `InitializeGlobalState`")]
IQueryRequestBuilder SetProperties(
IDictionary<string, object?>? properties);

/// <summary>
/// Initializes the global state of the request to the given
/// <paramref name="initialState" />.
Expand All @@ -67,10 +59,6 @@ IQueryRequestBuilder SetProperties(
IQueryRequestBuilder InitializeGlobalState(
IDictionary<string, object?>? initialState);

[Obsolete("Use `InitializeGlobalState`")]
IQueryRequestBuilder SetProperties(
IReadOnlyDictionary<string, object?>? properties);

/// <summary>
/// Initializes the global state of the request to the given
/// <paramref name="initialState" />.
Expand All @@ -80,10 +68,6 @@ IQueryRequestBuilder SetProperties(
IQueryRequestBuilder InitializeGlobalState(
IReadOnlyDictionary<string, object?>? initialState);

[Obsolete("Use `AddGlobalState`")]
IQueryRequestBuilder AddProperty(
string name, object? value);

/// <summary>
/// Sets the global state for <paramref name="name" />
/// to the specified <paramref name="value" />,
Expand All @@ -98,10 +82,6 @@ IQueryRequestBuilder AddProperty(
IQueryRequestBuilder AddGlobalState(
string name, object? value);

[Obsolete("Use `TryAddGlobalState`")]
IQueryRequestBuilder TryAddProperty(
string name, object? value);

/// <summary>
/// Sets the global state for <paramref name="name" />
/// to the specified <paramref name="value" />,
Expand All @@ -113,10 +93,6 @@ IQueryRequestBuilder TryAddProperty(
IQueryRequestBuilder TryAddGlobalState(
string name, object? value);

[Obsolete("Use `SetGlobalState`")]
IQueryRequestBuilder SetProperty(
string name, object? value);

/// <summary>
/// Sets the global state for <paramref name="name" />
/// to the specified <paramref name="value" />.
Expand All @@ -129,10 +105,6 @@ IQueryRequestBuilder SetProperty(
IQueryRequestBuilder SetGlobalState(
string name, object? value);

[Obsolete("Use `RemoveGlobalState`")]
IQueryRequestBuilder TryRemoveProperty(
string name);

/// <summary>
/// Removes the global state value for the specified
/// <paramref name="name" />.
Expand Down
Loading

0 comments on commit 4680c84

Please sign in to comment.