|
11 | 11 | import graphql.collect.ImmutableKit; |
12 | 12 | import graphql.introspection.Introspection; |
13 | 13 | import graphql.language.Argument; |
| 14 | +import graphql.normalized.incremental.DeferDeclaration; |
14 | 15 | import graphql.normalized.incremental.NormalizedDeferExecution; |
15 | 16 | import graphql.schema.GraphQLFieldDefinition; |
16 | 17 | import graphql.schema.GraphQLInterfaceType; |
@@ -67,7 +68,7 @@ public class ExecutableNormalizedField { |
67 | 68 | private final int level; |
68 | 69 |
|
69 | 70 | // Mutable List on purpose: it is modified after creation |
70 | | - private final LinkedHashSet<NormalizedDeferExecution> deferExecutions; |
| 71 | + private final LinkedHashSet<DeferDeclaration> deferExecutions; |
71 | 72 |
|
72 | 73 | private ExecutableNormalizedField(Builder builder) { |
73 | 74 | this.alias = builder.alias; |
@@ -263,11 +264,16 @@ public void clearChildren() { |
263 | 264 | } |
264 | 265 |
|
265 | 266 | @Internal |
266 | | - public void setDeferExecutions(Collection<NormalizedDeferExecution> deferExecutions) { |
| 267 | + public void setDeferExecutions(Collection<DeferDeclaration> deferExecutions) { |
267 | 268 | this.deferExecutions.clear(); |
268 | 269 | this.deferExecutions.addAll(deferExecutions); |
269 | 270 | } |
270 | 271 |
|
| 272 | + @Internal |
| 273 | + public void addDeferExecutions(Collection<DeferDeclaration> deferDeclarations) { |
| 274 | + this.deferExecutions.addAll(deferDeclarations); |
| 275 | + } |
| 276 | + |
271 | 277 | /** |
272 | 278 | * All merged fields have the same name so this is the name of the {@link ExecutableNormalizedField}. |
273 | 279 | * <p> |
@@ -475,7 +481,7 @@ public ExecutableNormalizedField getParent() { |
475 | 481 |
|
476 | 482 | // TODO: Javadoc |
477 | 483 | @ExperimentalApi |
478 | | - public LinkedHashSet<NormalizedDeferExecution> getDeferExecutions() { |
| 484 | + public LinkedHashSet<DeferDeclaration> getDeferExecutions() { |
479 | 485 | return deferExecutions; |
480 | 486 | } |
481 | 487 |
|
@@ -606,7 +612,7 @@ public static class Builder { |
606 | 612 | private LinkedHashMap<String, Object> resolvedArguments = new LinkedHashMap<>(); |
607 | 613 | private ImmutableList<Argument> astArguments = ImmutableKit.emptyList(); |
608 | 614 |
|
609 | | - private LinkedHashSet<NormalizedDeferExecution> deferExecutions = new LinkedHashSet<>(); |
| 615 | + private LinkedHashSet<DeferDeclaration> deferExecutions = new LinkedHashSet<>(); |
610 | 616 |
|
611 | 617 | private Builder() { |
612 | 618 | } |
@@ -677,7 +683,7 @@ public Builder parent(ExecutableNormalizedField parent) { |
677 | 683 | return this; |
678 | 684 | } |
679 | 685 |
|
680 | | - public Builder deferExecutions(LinkedHashSet<NormalizedDeferExecution> deferExecutions) { |
| 686 | + public Builder deferExecutions(LinkedHashSet<DeferDeclaration> deferExecutions) { |
681 | 687 | this.deferExecutions = deferExecutions; |
682 | 688 | return this; |
683 | 689 | } |
|
0 commit comments