Skip to content

Commit 9f0876f

Browse files
committed
Renamed it to getFieldDefinition
1 parent 2772310 commit 9f0876f

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/main/java/graphql/execution/ExecutionStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ protected ExecutionResult resolveField(ExecutionContext executionContext, Execut
8989
DataFetchingEnvironment environment = newDataFetchingEnvironment(executionContext)
9090
.source(parameters.source())
9191
.arguments(argumentValues)
92-
.field(fieldDef)
92+
.fieldDefinition(fieldDef)
9393
.fields(fields)
9494
.fieldType(fieldType)
9595
.parentType(parentType)

src/main/java/graphql/execution/batched/BatchedExecutionStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ private List<GraphQLExecutionNodeValue> fetchData(ExecutionContext executionCont
301301
DataFetchingEnvironment environment = newDataFetchingEnvironment(executionContext)
302302
.source(sources)
303303
.arguments(argumentValues)
304-
.field(fieldDef)
304+
.fieldDefinition(fieldDef)
305305
.fields(fields)
306306
.fieldType(fieldDef.getType())
307307
.parentType(parentType)

src/main/java/graphql/schema/DataFetchingEnvironment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public interface DataFetchingEnvironment {
7474
/**
7575
* @return the definition of the current field
7676
*/
77-
GraphQLFieldDefinition getField();
77+
GraphQLFieldDefinition getFieldDefinition();
7878

7979

8080
/**

src/main/java/graphql/schema/DataFetchingEnvironmentBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static DataFetchingEnvironmentBuilder newDataFetchingEnvironment(Executio
5252
private Map<String, Object> arguments = Collections.emptyMap();
5353
private Object context;
5454
private Object root;
55-
private GraphQLFieldDefinition field;
55+
private GraphQLFieldDefinition fieldDefinition;
5656
private List<Field> fields = Collections.emptyList();
5757
private GraphQLOutputType fieldType;
5858
private GraphQLType parentType;
@@ -82,8 +82,8 @@ public DataFetchingEnvironmentBuilder root(Object root) {
8282
return this;
8383
}
8484

85-
public DataFetchingEnvironmentBuilder field(GraphQLFieldDefinition field) {
86-
this.field = field;
85+
public DataFetchingEnvironmentBuilder fieldDefinition(GraphQLFieldDefinition fieldDefinition) {
86+
this.fieldDefinition = fieldDefinition;
8787
return this;
8888
}
8989

@@ -124,7 +124,7 @@ public DataFetchingEnvironmentBuilder selectionSet(DataFetchingFieldSelectionSet
124124

125125
public DataFetchingEnvironment build() {
126126
return new DataFetchingEnvironmentImpl(source, arguments, context, root,
127-
field, fields, fieldType, parentType, graphQLSchema, fragmentsByName, executionId, selectionSet
127+
fieldDefinition, fields, fieldType, parentType, graphQLSchema, fragmentsByName, executionId, selectionSet
128128
);
129129
}
130130
}

src/main/java/graphql/schema/DataFetchingEnvironmentImpl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class DataFetchingEnvironmentImpl implements DataFetchingEnvironment {
1616
private final Map<String, Object> arguments;
1717
private final Object context;
1818
private final Object root;
19-
private final GraphQLFieldDefinition field;
19+
private final GraphQLFieldDefinition fieldDefinition;
2020
private final List<Field> fields;
2121
private final GraphQLOutputType fieldType;
2222
private final GraphQLType parentType;
@@ -25,12 +25,12 @@ public class DataFetchingEnvironmentImpl implements DataFetchingEnvironment {
2525
private final ExecutionId executionId;
2626
private final DataFetchingFieldSelectionSet selectionSet;
2727

28-
public DataFetchingEnvironmentImpl(Object source, Map<String, Object> arguments, Object context, Object root, GraphQLFieldDefinition field, List<Field> fields, GraphQLOutputType fieldType, GraphQLType parentType, GraphQLSchema graphQLSchema, Map<String, FragmentDefinition> fragmentsByName, ExecutionId executionId, DataFetchingFieldSelectionSet selectionSet) {
28+
public DataFetchingEnvironmentImpl(Object source, Map<String, Object> arguments, Object context, Object root, GraphQLFieldDefinition fieldDefinition, List<Field> fields, GraphQLOutputType fieldType, GraphQLType parentType, GraphQLSchema graphQLSchema, Map<String, FragmentDefinition> fragmentsByName, ExecutionId executionId, DataFetchingFieldSelectionSet selectionSet) {
2929
this.source = source;
3030
this.arguments = arguments;
3131
this.context = context;
3232
this.root = root;
33-
this.field = field;
33+
this.fieldDefinition = fieldDefinition;
3434
this.fields = fields;
3535
this.fieldType = fieldType;
3636
this.parentType = parentType;
@@ -71,8 +71,8 @@ public <T> T getRoot() {
7171
}
7272

7373
@Override
74-
public GraphQLFieldDefinition getField() {
75-
return field;
74+
public GraphQLFieldDefinition getFieldDefinition() {
75+
return fieldDefinition;
7676
}
7777

7878
@Override

src/test/groovy/graphql/execution/ExecutionStrategyTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class ExecutionStrategyTest extends Specification {
214214

215215
then:
216216
1 * dataFetcher.get({ it -> environment = it })
217-
environment.field == fieldDefinition
217+
environment.fieldDefinition == fieldDefinition
218218
environment.graphQLSchema == schema
219219
environment.context == "context"
220220
environment.source == "source"

0 commit comments

Comments
 (0)