New Features
Support for providing a bean of type PreparsedDocumentProvider (#583) @paulbakker
It is now possible to register a bean of type PreparsedDocumentProvider
, which the framework uses during query execution.
A PreparsedDocumentProvider
can be used to build a cache of queries that were previously parsed, which can improve query execution performance.
The developer is responsible for choosing and configuring a cache implementation. The following is an example using Caffeine
.
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
@Configuration
static class PreparsedDocumentProviderConfig {
private final Cache<String, PreparsedDocumentEntry> cache = Caffeine.newBuilder().maximumSize(250)
.expireAfterAccess(5, TimeUnit.MINUTES).recordStats().build();
@Bean
public PreparsedDocumentProvider preparsedDocumentProvider() {
return (executionInput, parseAndValidateFunction) -> {
Function<String, PreparsedDocumentEntry> mapCompute = key -> parseAndValidateFunction.apply(executionInput);
return cache.get(executionInput.getQuery(), mapCompute);
};
}
}
}
Bug fixes
Fix lists nested in input types for input arguments (#591) @paulbakker
This fixes a bug that was introduced in 4.6.0
that caused lists of input objects nested inside an input object to not be deserialized correctly for @InputArgument
values.
Other changes
- Added test with null value for scalar in input argument (#590) @paulbakker
- Added test using Object scalar (#589) @paulbakker
- Upgrade to nebula netflixoss 10.2.0 (#581) @berngp