From 8d95eab587fd704c6f8bda9441ce3e4f32cb8014 Mon Sep 17 00:00:00 2001 From: Andrew Potter Date: Wed, 15 Mar 2017 09:27:43 -0600 Subject: [PATCH] Update version of graphql-java from 2.2.0 to 2.3.0 and fix tests. (fixes #12 and fixes #13) --- .gitignore | 1 + build.gradle | 12 +++++++++++- .../java/graphql/servlet/GraphQLVariablesTest.java | 12 ++++++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5b1dd549..36bc517d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build *.iml *.ipr *.iws +.idea/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index bba5367b..eff33673 100644 --- a/build.gradle +++ b/build.gradle @@ -30,6 +30,11 @@ repositories { } apply plugin: 'java' +compileJava { + sourceCompatibility = '1.8' + targetCompatibility = '1.8' +} + apply plugin: 'osgi' apply plugin: 'license' apply plugin: 'java-library-distribution' @@ -117,7 +122,7 @@ dependencies { compile 'commons-fileupload:commons-fileupload:1.3.1' // GraphQL - compile 'com.graphql-java:graphql-java:2.2.0' + compile 'com.graphql-java:graphql-java:2.3.0' compile 'com.graphql-java:graphql-java-annotations:0.13.1' // JSON @@ -179,6 +184,11 @@ modifyPom { name 'Yurii Rashkovskii' email 'yrashk@gmail.com' } + developer { + id 'apottere' + name 'Andrew Potter' + email 'apottere@gmail.com' + } } } } diff --git a/src/test/java/graphql/servlet/GraphQLVariablesTest.java b/src/test/java/graphql/servlet/GraphQLVariablesTest.java index 699490ff..67d54965 100644 --- a/src/test/java/graphql/servlet/GraphQLVariablesTest.java +++ b/src/test/java/graphql/servlet/GraphQLVariablesTest.java @@ -41,11 +41,19 @@ public static class Data { private String field2; } + @Value + public static class DataInput { + @GraphQLField + private String field1; + @GraphQLField + private String field2; + } + @GraphQLName("data") public static class DataQuery { @GraphQLField - public Data echo(Data data) { - return data; + public Data echo(DataInput data) { + return new Data(data.getField1(), data.getField2()); } }