Skip to content

Commit 8e256d2

Browse files
authored
Update version of graphql-java from 2.2.0 to 2.3.0 and fix tests. (fixes #12 and fixes #13) (#16)
1 parent 4aae259 commit 8e256d2

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ build
33
*.iml
44
*.ipr
55
*.iws
6+
.idea/

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ repositories {
3030
}
3131

3232
apply plugin: 'java'
33+
compileJava {
34+
sourceCompatibility = '1.8'
35+
targetCompatibility = '1.8'
36+
}
37+
3338
apply plugin: 'osgi'
3439
apply plugin: 'license'
3540
apply plugin: 'java-library-distribution'
@@ -117,7 +122,7 @@ dependencies {
117122
compile 'commons-fileupload:commons-fileupload:1.3.1'
118123

119124
// GraphQL
120-
compile 'com.graphql-java:graphql-java:2.2.0'
125+
compile 'com.graphql-java:graphql-java:2.3.0'
121126
compile 'com.graphql-java:graphql-java-annotations:0.13.1'
122127

123128
// JSON
@@ -179,6 +184,11 @@ modifyPom {
179184
name 'Yurii Rashkovskii'
180185
email 'yrashk@gmail.com'
181186
}
187+
developer {
188+
id 'apottere'
189+
name 'Andrew Potter'
190+
email 'apottere@gmail.com'
191+
}
182192
}
183193
}
184194
}

src/test/java/graphql/servlet/GraphQLVariablesTest.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,19 @@ public static class Data {
4141
private String field2;
4242
}
4343

44+
@Value
45+
public static class DataInput {
46+
@GraphQLField
47+
private String field1;
48+
@GraphQLField
49+
private String field2;
50+
}
51+
4452
@GraphQLName("data")
4553
public static class DataQuery {
4654
@GraphQLField
47-
public Data echo(Data data) {
48-
return data;
55+
public Data echo(DataInput data) {
56+
return new Data(data.getField1(), data.getField2());
4957
}
5058
}
5159

0 commit comments

Comments
 (0)