Compare commits

...

2 Commits

Author SHA1 Message Date
TakahashiNguyen 89c4967863 fix: better graphql handler (#40)
Release package / release (push) Successful in 16m42s
Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com>
Reviewed-on: #40
2026-04-28 16:48:39 +00:00
gitea-actions 26448bb66b chore: release [ci skip] 2026-04-28 07:40:08 +00:00
10 changed files with 25 additions and 11 deletions
+7
View File
@@ -1,3 +1,10 @@
## [1.5.16](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.5.15...v1.5.16) (2026-04-28)
### Bug Fixes
* better manager response ([#39](https://git.demonkernel.io.vn/FoodSurf/backend/issues/39)) ([5434445](https://git.demonkernel.io.vn/FoodSurf/backend/commit/5434445a4c8be08c990e84d4162479ffacd34147))
## [1.5.15](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.5.14...v1.5.15) (2026-04-26) ## [1.5.15](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.5.14...v1.5.15) (2026-04-26)
+1 -1
View File
@@ -9,7 +9,7 @@
<parent> <parent>
<groupId>com.drinkool</groupId> <groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId> <artifactId>drinkool</artifactId>
<version>1.5.15</version> <version>1.5.16</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent> <parent>
<groupId>com.drinkool</groupId> <groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId> <artifactId>drinkool</artifactId>
<version>1.5.15</version> <version>1.5.16</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent> <parent>
<groupId>com.drinkool</groupId> <groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId> <artifactId>drinkool</artifactId>
<version>1.5.15</version> <version>1.5.16</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@@ -2,11 +2,14 @@ package com.drinkool.controller;
import com.drinkool.dtos.GraphqlDto; import com.drinkool.dtos.GraphqlDto;
import io.smallrye.graphql.client.GraphQLClient; import io.smallrye.graphql.client.GraphQLClient;
import io.smallrye.graphql.client.GraphQLError;
import io.smallrye.graphql.client.dynamic.api.DynamicGraphQLClient; import io.smallrye.graphql.client.dynamic.api.DynamicGraphQLClient;
import jakarta.ws.rs.POST; import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path; import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import java.util.List;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
@Path("/api/eatery") @Path("/api/eatery")
public class EateryController { public class EateryController {
@@ -24,9 +27,13 @@ public class EateryController {
); );
if (response.hasError()) { if (response.hasError()) {
return jakarta.ws.rs.core.Response.status(500) List<String> errorMessages = response
.entity(response.getErrors()) .getErrors()
.build(); .stream()
.map(GraphQLError::getMessage)
.collect(Collectors.toList());
return Response.status(400).entity(errorMessages).build();
} }
return jakarta.ws.rs.core.Response.ok( return jakarta.ws.rs.core.Response.ok(
+1 -1
View File
@@ -14,7 +14,7 @@ spec:
spec: spec:
containers: containers:
- name: account-pod - name: account-pod
image: git.demonkernel.io.vn/foodsurf/account-service:1.5.15 image: git.demonkernel.io.vn/foodsurf/account-service:1.5.16
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8080 - containerPort: 8080
+1 -1
View File
@@ -14,7 +14,7 @@ spec:
spec: spec:
containers: containers:
- name: eatery-pod - name: eatery-pod
image: git.demonkernel.io.vn/foodsurf/eatery-service:1.5.15 image: git.demonkernel.io.vn/foodsurf/eatery-service:1.5.16
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8080 - containerPort: 8080
+1 -1
View File
@@ -14,7 +14,7 @@ spec:
spec: spec:
containers: containers:
- name: gateway-pod - name: gateway-pod
image: git.demonkernel.io.vn/foodsurf/gateway-service:1.5.15 image: git.demonkernel.io.vn/foodsurf/gateway-service:1.5.16
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8080 - containerPort: 8080
+1 -1
View File
@@ -9,7 +9,7 @@
<parent> <parent>
<groupId>com.drinkool</groupId> <groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId> <artifactId>drinkool</artifactId>
<version>1.5.15</version> <version>1.5.16</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
+1 -1
View File
@@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.drinkool</groupId> <groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId> <artifactId>drinkool</artifactId>
<version>1.5.15</version> <version>1.5.16</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<properties> <properties>
<maven.compiler.source>25</maven.compiler.source> <maven.compiler.source>25</maven.compiler.source>