-
-
Notifications
You must be signed in to change notification settings - Fork 725
/
FilterFieldHandler.cs
40 lines (37 loc) · 1.15 KB
/
FilterFieldHandler.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
using System.Diagnostics.CodeAnalysis;
using HotChocolate.Configuration;
using HotChocolate.Language;
using HotChocolate.Language.Visitors;
namespace HotChocolate.Data.Filters
{
public abstract class FilterFieldHandler<TContext, T>
: IFilterFieldHandler<TContext, T>
where TContext : FilterVisitorContext<T>
{
/// <inheritdoc />
public virtual bool TryHandleEnter(
TContext context,
IFilterField field,
ObjectFieldNode node,
[NotNullWhen(true)] out ISyntaxVisitorAction? action)
{
action = null;
return false;
}
/// <inheritdoc />
public virtual bool TryHandleLeave(
TContext context,
IFilterField field,
ObjectFieldNode node,
[NotNullWhen(true)] out ISyntaxVisitorAction? action)
{
action = null;
return false;
}
/// <inheritdoc />
public abstract bool CanHandle(
ITypeDiscoveryContext context,
IFilterInputTypeDefinition typeDefinition,
IFilterFieldDefinition fieldDefinition);
}
}