-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathIGraphQLExecutor.cs
53 lines (34 loc) · 1.81 KB
/
IGraphQLExecutor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GraphQL.Execution;
using GraphQL.Validation;
using GraphQL.Validation.Complexity;
// ReSharper disable once CheckNamespace
namespace GraphQL.Conventions
{
public interface IGraphQLExecutor<TResult>
{
IGraphQLExecutor<TResult> WithRequest(string requestBody);
IGraphQLExecutor<TResult> WithQueryString(string queryString);
IGraphQLExecutor<TResult> WithOperationName(string operationName);
IGraphQLExecutor<TResult> WithVariables(Inputs inputs);
IGraphQLExecutor<TResult> WithVariables(Dictionary<string, object> inputs);
IGraphQLExecutor<TResult> WithRootObject(object rootValue);
IGraphQLExecutor<TResult> WithUserContext(IUserContext userContext);
IGraphQLExecutor<TResult> WithCancellationToken(CancellationToken token);
IGraphQLExecutor<TResult> WithDependencyInjector(IDependencyInjector injector);
IGraphQLExecutor<TResult> WithValidationRules(IEnumerable<IValidationRule> rules);
[Obsolete("Please use the WithComplexityOptions method instead.")]
IGraphQLExecutor<TResult> WithComplexityConfiguration(LegacyComplexityConfiguration complexityConfiguration);
IGraphQLExecutor<TResult> WithComplexityOptions(ComplexityOptions complexityOptions);
IGraphQLExecutor<TResult> WithListeners(params IDocumentExecutionListener[] listeners);
IGraphQLExecutor<TResult> EnableValidation(bool enableValidation = true);
IGraphQLExecutor<TResult> DisableValidation();
IGraphQLExecutor<TResult> EnableProfiling(bool enableProfiling = true);
IGraphQLExecutor<TResult> DisableProfiling();
Task<TResult> ExecuteAsync();
Task<IValidationResult> ValidateAsync();
}
}