Skip to content

Commit 1b8e2f6

Browse files
committed
PR feedback
1 parent 7ee94e9 commit 1b8e2f6

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎src/main/java/graphql/normalized/NormalizedInputValue.java‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* A value with type information.
77
*/
88
public class NormalizedInputValue {
9-
private final String type;
9+
private final String typeName;
1010
private final Object value;
1111

12-
public NormalizedInputValue(String type, Object value) {
13-
this.type = type;
12+
public NormalizedInputValue(String typeName, Object value) {
13+
this.typeName = typeName;
1414
this.value = value;
1515
}
1616

@@ -19,8 +19,8 @@ public NormalizedInputValue(String type, Object value) {
1919
*
2020
* @return
2121
*/
22-
public String getType() {
23-
return type;
22+
public String getTypeName() {
23+
return typeName;
2424
}
2525

2626
/**
@@ -44,18 +44,18 @@ public boolean equals(Object o) {
4444
return false;
4545
}
4646
NormalizedInputValue that = (NormalizedInputValue) o;
47-
return Objects.equals(type, that.type) && Objects.equals(value, that.value);
47+
return Objects.equals(typeName, that.typeName) && Objects.equals(value, that.value);
4848
}
4949

5050
@Override
5151
public int hashCode() {
52-
return Objects.hash(type, value);
52+
return Objects.hash(typeName, value);
5353
}
5454

5555
@Override
5656
public String toString() {
5757
return "NormalizedInputValue{" +
58-
"type='" + type + '\'' +
58+
"typeName='" + typeName + '\'' +
5959
", value=" + value +
6060
'}';
6161
}

‎src/test/groovy/graphql/normalized/NormalizedQueryTreeFactoryTest.groovy‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,14 +1101,14 @@ schema {
11011101
def arg3 = secondField.getNormalizedArgument("arg3")
11021102

11031103
then:
1104-
topLevelField.getNormalizedArgument("id").getType() == "ID"
1104+
topLevelField.getNormalizedArgument("id").getTypeName() == "ID"
11051105
topLevelField.getNormalizedArgument("id").getValue() == "123"
11061106

1107-
arg1.getType() == "Input1"
1107+
arg1.getTypeName() == "Input1"
11081108
arg1.getValue() == expectedNormalizedArgValue
1109-
arg2.getType() == "Input1"
1109+
arg2.getTypeName() == "Input1"
11101110
arg2.value == expectedNormalizedArgValue
1111-
arg3.getType() == "Input1"
1111+
arg3.getTypeName() == "Input1"
11121112
arg3.value == expectedNormalizedArgValue
11131113

11141114
}
@@ -1149,15 +1149,15 @@ schema {
11491149
def arg3 = topLevelField.getNormalizedArgument("arg3")
11501150

11511151
then:
1152-
arg1.type == "[ID!]"
1152+
arg1.typeName == "[ID!]"
11531153
arg1.value == ["1", "2"]
1154-
arg2.type == "[[Input1]]"
1154+
arg2.typeName == "[[Input1]]"
11551155
arg2.value == [[
11561156
[foo: new NormalizedInputValue("String", "foo1"), input2: new NormalizedInputValue("Input2", [bar: new NormalizedInputValue("Int", 123)])],
11571157
[foo: new NormalizedInputValue("String", "foo2"), input2: new NormalizedInputValue("Input2", [bar: new NormalizedInputValue("Int", 456)])]
11581158
]]
11591159

1160-
arg3.getType() == "[Input1]"
1160+
arg3.getTypeName() == "[Input1]"
11611161
arg3.value == [
11621162
[foo: new NormalizedInputValue("String", "foo3"), input2: new NormalizedInputValue("Input2", [bar: new NormalizedInputValue("Int", 789)])],
11631163
]

0 commit comments

Comments
 (0)