Replies: 2 comments 1 reply
-
/cc @jmartisk (graphql), @phillip-kruger (graphql) |
Beta Was this translation helpful? Give feedback.
-
I’ve worked with Quarkus GraphQL and can help with this. First, create a custom exception. This will handle the internationalized messages. Use the @GraphQLException annotation. It allows you to catch and process exceptions in GraphQL. @GraphQLException
} Next, create a message resource bundle. This will store your internationalized messages. Place it in the src/main/resources folder. messages_en.properties Then, create a service to handle localization. Inject this service into your exception handler. @ApplicationScoped
}
} quarkus.graphql.error-handler=com.example.GraphQLExceptionHandler This setup ensures that your GraphQL exceptions return internationalized JSON responses. For more details, check the Quarkus documentation and the GraphQL Java documentation. Good luck with your implementation! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How to return internationalized json response in quarkus graphql when exception
Beta Was this translation helpful? Give feedback.
All reactions