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
Assets
2
paulbakker
released this
Support for proding a bean of type PreparsedDocumentProvider
Assets
2
We recommend developers to wait for 4.7.0, when available, since it has important fixes for Input Arguments serialization.
The serialization of an input argument into a collection requires an explicit collection type fails in this version.
What’s Changed
- Custom implementation of
convertValuefor input types (#549) @paulbakker. - DataFetchers can have an input argument annotated with
@CookieValueto express that such value should be fetch from the cookie inside the web request. (#542) @paulbakker. - In your server you can now declare a GraphQL Directive via the
@DgsDirectiveannotation. (#536) @hantsy - Metrics should skip instrumenting data fetchers annotated with
@DgsEnableDataFetcherInstrumentation(false)(#577) @berngp - Support methods that have multiple
@DgsDataannotations. (#574) @berngp - Add the @connection directive automatically when pagination module is used. (#568) @srinivasankavitha
⚠️ WARNING
Due the changes on #549 there are implicit modification on how GraphQL ID are serialized to input arguments.
The serialization of a GraphQLIDinput argument to a Javajava.util.Longwill not happen out of the box now.
In principal this is not correct since anIDshould be treated as aString, GraphQL defines it as follows... "the ID scalar type represents a unique identifier, often used to refetch an object or as the key for a cache. The ID type is serialized in the same way as a String; however, defining it as an ID signifies that it is not intended to be human‐readable." ref.
Performance Improvements
- Avoid calculating the stacktrace when calling ExecutionStrategyInstrumentationContext (#562 & #567) @berngp
- Call the ListableBeanFactory only once when fetching the MeterRegistry (#551) @berngp
Other
- chore: Add @JsonCreator to TypedGraphQLError (#556) @hantsy
- Added a test for working with a custom scalar for an input variable in the client (#572) @paulbakker
- Added test for input arguments without annotation. (#564) @paulbakker
- Bump spectator-api from 0.133.+ to 0.134.0 (#563) @dependabot
Assets
2
What’s Changed
Assets
2
What’s Changed
Assets
2
What’s Changed
- Address incorrect operation tag value (#519) @berngp
- Avoid instantiating Jackson mappers per request (#501) @kilink
- Avoid chaining collection operations (#500) @kilink
- Replace ci.yml with ci-compatibility.yml (#511) @berngp
- Assert Date, Time, and DateTime Scalar serde. (#506) @berngp
- Fix assertSubscription helper method (#499) @kilink
Assets
2
What’s Changed
- Address incorrect operation tag value (#519) @berngp
- Avoid instantiating Jackson mappers per request (#501) @kilink
- Avoid chaining collection operations (#500) @kilink
- Replace ci.yml with ci-compatibility.yml (#511) @berngp
- Assert Date, Time, and DateTime Scalar serde. (#506) @berngp
- Fix assertSubscription helper method (#499) @kilink

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
