Repository navigation
Expand file tree
/
Copy pathVariablePredicate.java
More file actions
42 lines (39 loc) · 1.65 KB
/
Copy pathVariablePredicate.java
File metadata and controls
42 lines (39 loc) · 1.65 KB
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
package graphql.normalized;
import graphql.PublicSpi;
import graphql.execution.directives.QueryAppliedDirective;
/**
* This predicate indicates whether a variable should be made for this field argument OR whether it will be compiled
* into a graphql AST literal.
*/
@PublicSpi
public interface VariablePredicate {
/**
* Return true if a variable should be made for this field argument
*
* @param executableNormalizedField the field in question
* @param argName the argument on the field
* @param normalizedInputValue the input value for that argument
*
* @return true if a variable should be made
*/
boolean shouldMakeVariable(ExecutableNormalizedField executableNormalizedField,
String argName,
NormalizedInputValue normalizedInputValue);
/**
* Return true if a variable should be made for this query directive argument
* on the specified field
*
* @param executableNormalizedField the field in question
* @param queryAppliedDirective the query directive in question
* @param argName the argument on the directive
* @param normalizedInputValue the input value for that argument
*
* @return true if a variable should be made
*/
default boolean shouldMakeVariable(ExecutableNormalizedField executableNormalizedField,
QueryAppliedDirective queryAppliedDirective,
String argName,
NormalizedInputValue normalizedInputValue) {
return false;
}
}