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