Skip to content

Commit 2b70665

Browse files
author
Enes Açıkoğlu
committed
piomin#1 fix apollo dependency
1 parent 5ab1b49 commit 2b70665

File tree

2 files changed

+90
-82
lines changed

2 files changed

+90
-82
lines changed

employee-service/pom.xml

Lines changed: 88 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,95 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
4-
<parent>
5-
<groupId>org.springframework.boot</groupId>
6-
<artifactId>spring-boot-starter-parent</artifactId>
7-
<version>2.0.0.RELEASE</version>
8-
</parent>
9-
<artifactId>employee-service</artifactId>
10-
<groupId>pl.piomin.services</groupId>
11-
<version>1.0-SNAPSHOT</version>
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>org.springframework.boot</groupId>
6+
<artifactId>spring-boot-starter-parent</artifactId>
7+
<version>2.0.0.RELEASE</version>
8+
</parent>
9+
<artifactId>employee-service</artifactId>
10+
<groupId>pl.piomin.services</groupId>
11+
<version>1.0-SNAPSHOT</version>
1212

13-
<properties>
14-
<java.version>1.8</java.version>
15-
</properties>
13+
<properties>
14+
<java.version>1.8</java.version>
15+
</properties>
1616

17-
<dependencyManagement>
18-
<dependencies>
19-
<dependency>
20-
<groupId>org.springframework.cloud</groupId>
21-
<artifactId>spring-cloud-dependencies</artifactId>
22-
<version>Finchley.SR1</version>
23-
<type>pom</type>
24-
<scope>import</scope>
25-
</dependency>
26-
</dependencies>
27-
</dependencyManagement>
17+
<dependencyManagement>
18+
<dependencies>
19+
<dependency>
20+
<groupId>org.springframework.cloud</groupId>
21+
<artifactId>spring-cloud-dependencies</artifactId>
22+
<version>Finchley.SR1</version>
23+
<type>pom</type>
24+
<scope>import</scope>
25+
</dependency>
26+
</dependencies>
27+
</dependencyManagement>
2828

29-
<dependencies>
30-
<dependency>
31-
<groupId>org.springframework.cloud</groupId>
32-
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
33-
</dependency>
34-
<dependency>
35-
<groupId>org.springframework.boot</groupId>
36-
<artifactId>spring-boot-starter-web</artifactId>
37-
</dependency>
38-
<dependency>
39-
<groupId>org.springframework.boot</groupId>
40-
<artifactId>spring-boot-starter-actuator</artifactId>
41-
</dependency>
42-
<dependency>
43-
<groupId>com.graphql-java</groupId>
44-
<artifactId>graphql-spring-boot-starter</artifactId>
45-
<version>5.0.2</version>
46-
</dependency>
47-
<dependency>
48-
<groupId>com.graphql-java</groupId>
49-
<artifactId>graphiql-spring-boot-starter</artifactId>
50-
<version>5.0.2</version>
51-
</dependency>
52-
<dependency>
53-
<groupId>com.graphql-java</groupId>
54-
<artifactId>voyager-spring-boot-starter</artifactId>
55-
<version>5.0.2</version>
56-
</dependency>
57-
<dependency>
58-
<groupId>com.graphql-java</groupId>
59-
<artifactId>graphql-java</artifactId>
60-
<version>9.2</version>
61-
</dependency>
62-
<dependency>
63-
<groupId>com.graphql-java</groupId>
64-
<artifactId>graphql-java-tools</artifactId>
65-
<version>5.2.3</version>
66-
</dependency>
67-
<dependency>
68-
<groupId>com.apollographql.apollo</groupId>
69-
<artifactId>apollo-runtime</artifactId>
70-
<version>1.0.1-SNAPSHOT</version>
71-
</dependency>
72-
<dependency>
73-
<groupId>org.springframework.boot</groupId>
74-
<artifactId>spring-boot-starter-test</artifactId>
75-
</dependency>
76-
</dependencies>
29+
<dependencies>
30+
<dependency>
31+
<groupId>org.springframework.cloud</groupId>
32+
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
33+
</dependency>
34+
<dependency>
35+
<groupId>org.springframework.boot</groupId>
36+
<artifactId>spring-boot-starter-web</artifactId>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.springframework.boot</groupId>
40+
<artifactId>spring-boot-starter-actuator</artifactId>
41+
</dependency>
42+
<dependency>
43+
<groupId>com.graphql-java</groupId>
44+
<artifactId>graphql-spring-boot-starter</artifactId>
45+
<version>5.0.2</version>
46+
</dependency>
47+
<dependency>
48+
<groupId>com.graphql-java</groupId>
49+
<artifactId>graphiql-spring-boot-starter</artifactId>
50+
<version>5.0.2</version>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.graphql-java</groupId>
54+
<artifactId>voyager-spring-boot-starter</artifactId>
55+
<version>5.0.2</version>
56+
</dependency>
57+
<dependency>
58+
<groupId>com.graphql-java</groupId>
59+
<artifactId>graphql-java</artifactId>
60+
<version>9.2</version>
61+
</dependency>
62+
<dependency>
63+
<groupId>com.graphql-java</groupId>
64+
<artifactId>graphql-java-tools</artifactId>
65+
<version>5.2.3</version>
66+
</dependency>
67+
<dependency>
68+
<groupId>com.apollographql.apollo</groupId>
69+
<artifactId>apollo-runtime</artifactId>
70+
<version>1.0.1-SNAPSHOT</version>
71+
</dependency>
72+
<dependency>
73+
<groupId>org.springframework.boot</groupId>
74+
<artifactId>spring-boot-starter-test</artifactId>
75+
</dependency>
76+
</dependencies>
7777

78-
<build>
79-
<plugins>
80-
<plugin>
81-
<groupId>org.springframework.boot</groupId>
82-
<artifactId>spring-boot-maven-plugin</artifactId>
83-
</plugin>
84-
</plugins>
85-
</build>
78+
<repositories>
79+
<repository>
80+
<id>apollo-runtime</id>
81+
<name>Apollo snapshot release</name>
82+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
83+
</repository>
84+
</repositories>
85+
86+
<build>
87+
<plugins>
88+
<plugin>
89+
<groupId>org.springframework.boot</groupId>
90+
<artifactId>spring-boot-maven-plugin</artifactId>
91+
</plugin>
92+
</plugins>
93+
</build>
8694

8795
</project>

employee-service/src/main/java/pl/piomin/services/employee/model/EmployeesQuery.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ public ResponseFieldMarshaller marshaller() {
115115
public void marshal(ResponseWriter writer) {
116116
writer.writeList($responseFields[0], employees, new ResponseWriter.ListWriter() {
117117
@Override
118-
public void write(Object value, ResponseWriter.ListItemWriter listItemWriter) {
119-
listItemWriter.writeObject(((Employee) value).marshaller());
118+
public void write(@Nullable List list, @NotNull ResponseWriter.ListItemWriter listItemWriter) {
119+
list.forEach(value-> listItemWriter.writeObject(((Employee) value).marshaller()));
120120
}
121121
});
122122
}

0 commit comments

Comments
 (0)