From 2b70665293c00e24bd29fd3008abce2c9417d0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enes=20A=C3=A7=C4=B1ko=C4=9Flu?= Date: Sun, 21 Apr 2019 14:27:49 +0300 Subject: [PATCH] #1 fix apollo dependency --- employee-service/pom.xml | 168 +++++++++--------- .../employee/model/EmployeesQuery.java | 4 +- 2 files changed, 90 insertions(+), 82 deletions(-) diff --git a/employee-service/pom.xml b/employee-service/pom.xml index 96e7d43..e71c3ee 100644 --- a/employee-service/pom.xml +++ b/employee-service/pom.xml @@ -1,87 +1,95 @@ - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.0.0.RELEASE - - employee-service - pl.piomin.services - 1.0-SNAPSHOT + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.0.0.RELEASE + + employee-service + pl.piomin.services + 1.0-SNAPSHOT - - 1.8 - + + 1.8 + - - - - org.springframework.cloud - spring-cloud-dependencies - Finchley.SR1 - pom - import - - - + + + + org.springframework.cloud + spring-cloud-dependencies + Finchley.SR1 + pom + import + + + - - - org.springframework.cloud - spring-cloud-starter-netflix-eureka-client - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-actuator - - - com.graphql-java - graphql-spring-boot-starter - 5.0.2 - - - com.graphql-java - graphiql-spring-boot-starter - 5.0.2 - - - com.graphql-java - voyager-spring-boot-starter - 5.0.2 - - - com.graphql-java - graphql-java - 9.2 - - - com.graphql-java - graphql-java-tools - 5.2.3 - - - com.apollographql.apollo - apollo-runtime - 1.0.1-SNAPSHOT - - - org.springframework.boot - spring-boot-starter-test - - + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-actuator + + + com.graphql-java + graphql-spring-boot-starter + 5.0.2 + + + com.graphql-java + graphiql-spring-boot-starter + 5.0.2 + + + com.graphql-java + voyager-spring-boot-starter + 5.0.2 + + + com.graphql-java + graphql-java + 9.2 + + + com.graphql-java + graphql-java-tools + 5.2.3 + + + com.apollographql.apollo + apollo-runtime + 1.0.1-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-test + + - - - - org.springframework.boot - spring-boot-maven-plugin - - - + + + apollo-runtime + Apollo snapshot release + https://oss.sonatype.org/content/repositories/snapshots/ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + \ No newline at end of file diff --git a/employee-service/src/main/java/pl/piomin/services/employee/model/EmployeesQuery.java b/employee-service/src/main/java/pl/piomin/services/employee/model/EmployeesQuery.java index 14b9f03..6fe4914 100644 --- a/employee-service/src/main/java/pl/piomin/services/employee/model/EmployeesQuery.java +++ b/employee-service/src/main/java/pl/piomin/services/employee/model/EmployeesQuery.java @@ -115,8 +115,8 @@ public ResponseFieldMarshaller marshaller() { public void marshal(ResponseWriter writer) { writer.writeList($responseFields[0], employees, new ResponseWriter.ListWriter() { @Override - public void write(Object value, ResponseWriter.ListItemWriter listItemWriter) { - listItemWriter.writeObject(((Employee) value).marshaller()); + public void write(@Nullable List list, @NotNull ResponseWriter.ListItemWriter listItemWriter) { + list.forEach(value-> listItemWriter.writeObject(((Employee) value).marshaller())); } }); }