Skip to content

Commit e8f1699

Browse files
SimonCroppjoemcbride
authored andcommitted
remove obsolete types (graphql-dotnet#1033)
1 parent 7f5e6bd commit e8f1699

File tree

5 files changed

+1
-132
lines changed

5 files changed

+1
-132
lines changed

src/GraphQL/Execution/DocumentExecuter.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@ namespace GraphQL
1616
{
1717
public interface IDocumentExecuter
1818
{
19-
[Obsolete("This method will be removed in a future version. Use ExecutionOptions parameter.")]
20-
Task<ExecutionResult> ExecuteAsync(
21-
ISchema schema,
22-
object root,
23-
string query,
24-
string operationName,
25-
Inputs inputs = null,
26-
object userContext = null,
27-
CancellationToken cancellationToken = default,
28-
IEnumerable<IValidationRule> rules = null);
29-
3019
Task<ExecutionResult> ExecuteAsync(ExecutionOptions options);
3120
Task<ExecutionResult> ExecuteAsync(Action<ExecutionOptions> configure);
3221
}

src/GraphQL/Http/DocumentWriter.cs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ namespace GraphQL.Http
1010
public interface IDocumentWriter
1111
{
1212
Task WriteAsync<T>(Stream stream, T value);
13-
14-
[Obsolete("This method is obsolete and will be removed in the next major version. Use WriteAsync<T>(Stream, T) instead.")]
15-
Task<IByteResult> WriteAsync<T>(T value);
16-
17-
[Obsolete("This method is obsolete and will be removed in the next major version. Use WriteAsync<T>(Stream, T) instead.")]
18-
string Write(object value);
19-
}
13+
}
2014

2115
public class DocumentWriter : IDocumentWriter
2216
{
@@ -59,23 +53,6 @@ public async Task WriteAsync<T>(Stream stream, T value)
5953
}
6054
}
6155

62-
public async Task<IByteResult> WriteAsync<T>(T value)
63-
{
64-
var pooledDocumentResult = new PooledByteResult(_pool, _maxArrayLength);
65-
var stream = pooledDocumentResult.Stream;
66-
try
67-
{
68-
await WriteAsync(stream, value).ConfigureAwait(false);
69-
pooledDocumentResult.InitResponseFromCurrentStreamPosition();
70-
return pooledDocumentResult;
71-
}
72-
catch (Exception)
73-
{
74-
pooledDocumentResult.Dispose();
75-
throw;
76-
}
77-
}
78-
7956
public string Write(object value)
8057
{
8158
if (value == null) throw new ArgumentNullException(nameof(value));

src/GraphQL/Http/PooledByteResult.cs

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/GraphQL/Subscription/SubscriptionExecuter.cs

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/GraphQL/Types/Schema.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public Schema(Func<Type, IGraphType> resolveType)
7272
public Schema(IDependencyResolver dependencyResolver)
7373
{
7474
DependencyResolver = dependencyResolver;
75-
ResolveType = type => dependencyResolver.Resolve(type) as IGraphType;
7675

7776
_lookup = new Lazy<GraphTypesLookup>(CreateTypesLookup);
7877
_additionalTypes = new List<Type>();
@@ -114,11 +113,6 @@ public void Initialize()
114113

115114
public IObjectGraphType Subscription { get; set; }
116115

117-
[Obsolete(
118-
"The ResolveType property has been deprecated in favor of using the DependencyResolver property. " +
119-
"This property will be removed in a future version.")]
120-
public Func<Type, IGraphType> ResolveType { get; set; }
121-
122116
public IDependencyResolver DependencyResolver { get; set; }
123117

124118
public IEnumerable<DirectiveGraphType> Directives
@@ -209,7 +203,6 @@ public IGraphType FindType(string name)
209203

210204
public void Dispose()
211205
{
212-
ResolveType = null;
213206
DependencyResolver = null;
214207
Query = null;
215208
Mutation = null;

0 commit comments

Comments
 (0)