-
-
Notifications
You must be signed in to change notification settings - Fork 723
/
IObjectField.cs
71 lines (59 loc) · 2.12 KB
/
IObjectField.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System.Collections.Generic;
using System.Reflection;
using HotChocolate.Resolvers;
#nullable enable
namespace HotChocolate.Types;
/// <summary>
/// Represents a field of an <see cref="IObjectType"/>.
/// </summary>
public interface IObjectField : IOutputField
{
/// <summary>
/// Gets the type that declares this field.
/// </summary>
new IObjectType DeclaringType { get; }
/// <summary>
/// Defines if this field can be executed in parallel with other fields.
/// </summary>
bool IsParallelExecutable { get; }
/// <summary>
/// Defines that the resolver pipeline returns an
/// <see cref="IAsyncEnumerable{T}"/> as its result.
/// </summary>
bool HasStreamResult { get; }
/// <summary>
/// Gets the field resolver middleware.
/// </summary>
FieldDelegate Middleware { get; }
/// <summary>
/// Gets the field resolver.
/// </summary>
FieldResolverDelegate? Resolver { get; }
/// <summary>
/// Gets the pure field resolver. The pure field resolver is only available if this field
/// can be resolved without side-effects. The execution engine will prefer this resolver
/// variant if it is available and there are no executable directives that add a middleware
/// to this field.
/// </summary>
PureFieldDelegate? PureResolver { get; }
/// <summary>
/// Gets the subscription resolver.
/// </summary>
SubscribeResolverDelegate? SubscribeResolver { get; }
/// <summary>
/// Gets all executable directives that are associated with this field.
/// </summary>
IReadOnlyList<IDirective> ExecutableDirectives { get; }
/// <summary>
/// Gets the associated member of the runtime type for this field.
/// This property can be <c>null</c> if this field is not associated to
/// a concrete member on the runtime type.
/// </summary>
MemberInfo? Member { get; }
/// <summary>
/// Gets the resolver member of this filed.
/// If this field has no explicit resolver member
/// this property will return <see cref="Member"/>.
/// </summary>
MemberInfo? ResolverMember { get; }
}