You're seeing the release note of an old version. Check out the latest release note.
v1.20.0
October 5, 2022
🌟 New features
-
You can now handle a GraphQL error using
GraphqlErrorHandler. #4435GraphqlErrorHandler errorHandler = new GraphqlErrorHandler() {
@Override
public HttpResponse handle(ServiceRequestContext ctx, ExecutionInput input,
ExecutionResult result, @Nullable Throwable cause) {
final List<GraphQLError> errors = result.getErrors();
if (errors.stream().map(GraphQLError::getMessage)
.anyMatch(m -> m.startsWith("Unauthorized"))) {
return HttpResponse.of(HttpStatus.UNAUTHORIZED);
}
...
}
};
GraphqlService
.builder()
.schemaFile(...)
.runtimeWiring(...)
.errorHandler(errorHandler) // 👈👈👈
.build(); -
You can now easily configure client-side TLS key and certificates to support mTLS via
ClientFactoryBuilder.tls(). #4410File keyCertChainFile = ...;
File keyFile = ...;
ClientFactory factory =
ClientFactory
.builder()
.tls(keyCertChainFile, keyFile)
.build();
WebClient
.builder()
.factory(factory)
.build(); -
gRPC HTTP/JSON transcoding endpoint can now handle both the snake case and camel case query parameters using
HttpJsonTranscodingOptions. #4428HttpJsonTranscodingOptions options =
HttpJsonTranscodingOptions
.builder()
// Try the original field name and camel case
// if it's not found via the original name.
.queryParamMatchRules(LOWER_CAMEL_CASE,
ORIGINAL_FIELD)
...
.build();
GrpcService
.builder()
.enableHttpJsonTranscoding(options)
.build(); -
You can now use
OutputStreamto write data to aStreamMessageusingStreamMessage.fromOutputStream(). #4402StreamMessage.fromOutputStream(os -> {
// perform blocking operation
HttpData data0 = readDataFromBlockingDB(0);
os.write(data0);
HttpData data1 = readDataFromBlockingDB(1);
os.write(data1);
os.close();
} -
You can now convert an
AggregatedHttpRequestto anHttpRequestwith new headers. #4441AggregatedHttpRequest req = ...
HttpRequest httpRequest = req.toHttpRequest(newHeaders);
📈 Improvements
- N/A
🛠️ Bug fixes
GraphQlServicenow respects the accept header correctly. #4451GrpcServiceandTHttpServiceno longer throw double subscription exceptions when the request is aggregated in a decorator. #4449- The content-length header is automatically removed from
ResponseHeadersfor a server streaming response inGrpcService. #4460 - You no longer see a
NullPointerExceptionwhen usingEndpointSelectionStrategy.rampingUp(). #4448 DocServiceno longer throw an exception when a protobuf message doesn't have any fields. #4436- You no longer see a 500 response when an empty multipart request is sent. #4432
- The service name generated from a CGLIB-enhanced class no longer has a synthetic suffix in
DocService. #4430 - Users can now use
ProtobufRequestConverterFunctionProviderwithout encountering a potentialClassCastException. #4429 - Fixed a regression where
thrift0.9is incompatible with Thrift 0.9.1 since Armeria 1.17.0. #4427 enable-auto-injectionproperty is correctly added to the generatedspring-configuration-metadata.jsonfile. #4425
📃 Documentation
- N/A
🏚️ Deprecations
HttpRequest.aggregateWithPooledObjects()andHttpResponse.aggregateWithPooledObjects()are deprecated. #4449GrpcServiceBuilder.httpJsonTranscodingErrorHandler()is deprecated. #4428
☢️ Breaking changes
- N/A
⛓ Dependencies
You can use Thrift 0.17 with Armeria.
- Brave 5.13.11 → 5.14.0
- Dropwizard2 2.1.1 → 2.1.2
- GraphQL Java 19.0 → 19.2
- GraphQL Kotlin 6.2.2 → 6.2.5
- gRPC Java 1.49.0 → 1.49.1
- Kafka 3.2.1 → 3.3.0
- Kotlin 1.7.10 → 1.7.20
- Micrometer 1.9.3 → 1.9.4
- Netty 4.1.79.Final → 4.1.82.Final
- io_uring 0.0.14.Final → 0.0.15.Final
- Reactor 3.4.22 → 3.4.23
- Sangria GraphQL 3.2.0 → 3.3.0
- Scala 2.12.16 → 2.12.17, 2.13.8 → 2.13.9
- Spring Boot 2.7.3 → 2.7.4
- Thrift 0.17.0 is added
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:











