Skip to content

Commit bd4277a

Browse files
committed
rename ExecutionInfo to ExecutionStepInfo
1 parent 99aac04 commit bd4277a

33 files changed

Lines changed: 308 additions & 308 deletions

‎src/main/java/graphql/UnresolvedTypeError.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package graphql;
22

3-
import graphql.execution.ExecutionInfo;
43
import graphql.execution.ExecutionPath;
4+
import graphql.execution.ExecutionStepInfo;
55
import graphql.execution.UnresolvedTypeException;
66
import graphql.language.SourceLocation;
77

@@ -17,14 +17,14 @@ public class UnresolvedTypeError implements GraphQLError {
1717
private final List<Object> path;
1818
private final UnresolvedTypeException exception;
1919

20-
public UnresolvedTypeError(ExecutionPath path, ExecutionInfo info,
20+
public UnresolvedTypeError(ExecutionPath path, ExecutionStepInfo info,
2121
UnresolvedTypeException exception) {
2222
this.path = assertNotNull(path).toList();
2323
this.exception = assertNotNull(exception);
2424
this.message = mkMessage(path, exception, assertNotNull(info));
2525
}
2626

27-
private String mkMessage(ExecutionPath path, UnresolvedTypeException exception, ExecutionInfo info) {
27+
private String mkMessage(ExecutionPath path, UnresolvedTypeException exception, ExecutionStepInfo info) {
2828
return format("Can't resolve '%s'. Abstract type '%s' must resolve to an Object type at runtime for field '%s.%s'. %s",
2929
path,
3030
exception.getInterfaceOrUnionType().getName(),

‎src/main/java/graphql/execution/AsyncExecutionStrategy.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private Supplier<CompletableFuture<ExecutionResult>> deferredExecutionResult(Exe
126126

127127
Instrumentation instrumentation = executionContext.getInstrumentation();
128128
DeferredFieldInstrumentationContext fieldCtx = instrumentation.beginDeferredField(
129-
new InstrumentationDeferredFieldParameters(executionContext, parameters, fieldDef, executionInfo(executionContext, parameters, fieldDef))
129+
new InstrumentationDeferredFieldParameters(executionContext, parameters, fieldDef, createExecutionStepInfo(executionContext, parameters, fieldDef))
130130
);
131131
CompletableFuture<ExecutionResult> result = new CompletableFuture<>();
132132
fieldCtx.onDispatched(result);

‎src/main/java/graphql/execution/Execution.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
import static graphql.Assert.assertShouldNeverHappen;
3434
import static graphql.execution.ExecutionContextBuilder.newExecutionContextBuilder;
35+
import static graphql.execution.ExecutionStepInfo.newExecutionStepInfo;
3536
import static graphql.execution.ExecutionStrategyParameters.newParameters;
36-
import static graphql.execution.ExecutionInfo.newExecutionInfo;
3737
import static graphql.language.OperationDefinition.Operation.MUTATION;
3838
import static graphql.language.OperationDefinition.Operation.QUERY;
3939
import static graphql.language.OperationDefinition.Operation.SUBSCRIPTION;
@@ -134,11 +134,11 @@ private CompletableFuture<ExecutionResult> executeOperation(ExecutionContext exe
134134
Map<String, List<Field>> fields = fieldCollector.collectFields(collectorParameters, operationDefinition.getSelectionSet());
135135

136136
ExecutionPath path = ExecutionPath.rootPath();
137-
ExecutionInfo executionInfo = newExecutionInfo().type(operationRootType).path(path).build();
138-
NonNullableFieldValidator nonNullableFieldValidator = new NonNullableFieldValidator(executionContext, executionInfo);
137+
ExecutionStepInfo executionStepInfo = newExecutionStepInfo().type(operationRootType).path(path).build();
138+
NonNullableFieldValidator nonNullableFieldValidator = new NonNullableFieldValidator(executionContext, executionStepInfo);
139139

140140
ExecutionStrategyParameters parameters = newParameters()
141-
.executionInfo(executionInfo)
141+
.executionStepInfo(executionStepInfo)
142142
.source(root)
143143
.fields(fields)
144144
.nonNullFieldValidator(nonNullableFieldValidator)

src/main/java/graphql/execution/ExecutionInfo.java renamed to src/main/java/graphql/execution/ExecutionStepInfo.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@
3030
* type instances, so this helper class adds this information during query execution.
3131
*/
3232
@PublicApi
33-
public class ExecutionInfo {
33+
public class ExecutionStepInfo {
3434

3535
private final GraphQLType type;
3636
private final Field field;
3737
private final GraphQLFieldDefinition fieldDefinition;
3838
private final ExecutionPath path;
3939
private final boolean typeIsNonNull;
4040
private final Map<String, Object> arguments;
41-
private final ExecutionInfo parentInfo;
41+
private final ExecutionStepInfo parent;
4242

43-
private ExecutionInfo(GraphQLType type, GraphQLFieldDefinition fieldDefinition, Field field, ExecutionPath path, ExecutionInfo parentInfo, boolean nonNull, Map<String, Object> arguments) {
43+
private ExecutionStepInfo(GraphQLType type, GraphQLFieldDefinition fieldDefinition, Field field, ExecutionPath path, ExecutionStepInfo parent, boolean nonNull, Map<String, Object> arguments) {
4444
this.fieldDefinition = fieldDefinition;
4545
this.field = field;
4646
this.path = path;
47-
this.parentInfo = parentInfo;
47+
this.parent = parent;
4848
this.type = type;
4949
this.typeIsNonNull = nonNull;
5050
this.arguments = arguments;
@@ -137,15 +137,15 @@ public <T> T getArgument(String name) {
137137
/**
138138
* @return the parent type information
139139
*/
140-
public ExecutionInfo getParent() {
141-
return parentInfo;
140+
public ExecutionStepInfo getParent() {
141+
return parent;
142142
}
143143

144144
/**
145145
* @return true if the type has a parent (most do)
146146
*/
147147
public boolean hasParent() {
148-
return parentInfo != null;
148+
return parent != null;
149149
}
150150

151151
/**
@@ -158,8 +158,8 @@ public boolean hasParent() {
158158
*
159159
* @return a new type info with the same
160160
*/
161-
public ExecutionInfo treatAs(GraphQLType newType) {
162-
return new ExecutionInfo(unwrapNonNull(newType), fieldDefinition, field, path, this.parentInfo, this.typeIsNonNull, arguments);
161+
public ExecutionStepInfo treatAs(GraphQLType newType) {
162+
return new ExecutionStepInfo(unwrapNonNull(newType), fieldDefinition, field, path, this.parent, this.typeIsNonNull, arguments);
163163
}
164164

165165

@@ -213,10 +213,10 @@ public String toAst() {
213213

214214
@Override
215215
public String toString() {
216-
return "ExecutionInfo{" +
216+
return "ExecutionStepInfo{" +
217217
" path=" + path +
218218
", type=" + type +
219-
", parentInfo=" + parentInfo +
219+
", parentInfo=" + parent +
220220
", typeIsNonNull=" + typeIsNonNull +
221221
", fieldDefinition=" + fieldDefinition +
222222
'}';
@@ -233,20 +233,20 @@ private static GraphQLType unwrapNonNull(GraphQLType type) {
233233
/**
234234
* @return a builder of type info
235235
*/
236-
public static ExecutionInfo.Builder newExecutionInfo() {
236+
public static ExecutionStepInfo.Builder newExecutionStepInfo() {
237237
return new Builder();
238238
}
239239

240240
public static class Builder {
241241
GraphQLType type;
242-
ExecutionInfo parentInfo;
242+
ExecutionStepInfo parentInfo;
243243
GraphQLFieldDefinition fieldDefinition;
244244
Field field;
245245
ExecutionPath executionPath;
246246
Map<String, Object> arguments = new LinkedHashMap<>();
247247

248248
/**
249-
* @see ExecutionInfo#newExecutionInfo()
249+
* @see ExecutionStepInfo#newExecutionStepInfo()
250250
*/
251251
private Builder() {
252252
}
@@ -256,8 +256,8 @@ public Builder type(GraphQLType type) {
256256
return this;
257257
}
258258

259-
public Builder parentInfo(ExecutionInfo executionInfo) {
260-
this.parentInfo = executionInfo;
259+
public Builder parentInfo(ExecutionStepInfo executionStepInfo) {
260+
this.parentInfo = executionStepInfo;
261261
return this;
262262
}
263263

@@ -281,11 +281,11 @@ public Builder arguments(Map<String, Object> arguments) {
281281
return this;
282282
}
283283

284-
public ExecutionInfo build() {
284+
public ExecutionStepInfo build() {
285285
if (isNonNull(type)) {
286-
return new ExecutionInfo(unwrapNonNull(type), fieldDefinition, field, executionPath, parentInfo, true, arguments);
286+
return new ExecutionStepInfo(unwrapNonNull(type), fieldDefinition, field, executionPath, parentInfo, true, arguments);
287287
}
288-
return new ExecutionInfo(type, fieldDefinition, field, executionPath, parentInfo, false, arguments);
288+
return new ExecutionStepInfo(type, fieldDefinition, field, executionPath, parentInfo, false, arguments);
289289
}
290290
}
291291
}

0 commit comments

Comments
 (0)