Releases: graphql-java/graphql-java
25.0
Key changes
Dataloader
Refactoring strategy
The existing PerLevelDataLoaderStrategy has been refactored which lead to simplifications and performance improvements.
New strategies
Two new strategies were introduced: CHAINED and EXHAUSTED. Both can be configured via UnusalConfiguration (see next section).
CHAINED allow for chained DataLoaders to be used while keeping a per level dispatch strategies.
EXHAUSTED is a completely new strategy that works on the basis to dispatch once the engine is not busy. It mirrors the JS data loader dispatch strategy, but for a multi threaded system.
Unusual Configuration
A more generalised configuration mechanism has been added for "unusual configuration". By that we mean configuation we dont expect many people to use but if they do its now in a more common place
For example if you wanted to change the maximum depth the document parser will accept you could call the following methods.
var parserOptions = newParserOptions().maxRuleDepth(99).build()
GraphQL.unusualConfiguration().parsing().setDefaultParserOptions(parserOptions)
JSpecify Annotations
The team are starting to embrace https://jspecify.dev/ annotations as the way to indicate nullable and non nullable fields. Many important classes have had these annotations added to help make it more semantically clear when a value can be null or not.
Breaking Changes
A wrapping FetchedValue object is not always returned on field fetchers for performance reasons. This means that graphql.execution.instrumentation.parameters.InstrumentationFieldCompleteParameters#getFetchedObject was created to replace the older getFetchedValue method and the returns object can sometimes be a FetchedValue or sometimes a simple POJO value.
Performance improvements
A series of performance improvements have been made to reduce the memory footprint of the library. Also the Java .stream() operator can be slower than a more direct loop and many of these calls have been changed for performance reasons.
- avoid wrapping materialized fieldValueObject in a CompletableFuture by @samuelAndalon in #3943
- ExecutionStrategyParameters now has a direct transform without a Builder by @bbakerman in #3935
- ExecutionStepInfo now has a direct transform without a Builder by @bbakerman in #3934
- FpKit now longer uses streams for performance reasons by @bbakerman in #3932
- Implement toString/hashCode/equals for DataFetcherResult by @AlexandreCarlton in #3964
- Introduce a filter and map imperative method to replace .stream() calls by @bbakerman in #3931
- Removing some of the Optional.map() and .stream() for performance reasons by @bbakerman in #3930
- Stop creating NonNullableFieldValidator every for every object or list field by @bbakerman in #3929
What's Changed
- Bump EnricoMi/publish-unit-test-result-action from 2.18.0 to 2.19.0 by @dependabot[bot] in #3906
- Add JSpecify nullability annotations to DataFetcherResult by @dondonz in #3891
- Clean up ReactiveSupport by @hantsy in #3908
- Remove unused import by @ngocnhan-tran1996 in #3905
- Bump com.tngtech.archunit:archunit-junit5 from 1.2.0 to 1.4.0 by @dependabot[bot] in #3907
- add dataloader performance test by @andimarek in #3913
- Fix and improve EngineRunning state by @andimarek in #3911
- move jmh tests into dedicated folder by @andimarek in #3916
- Revert "New spec validation: Subscriptions root field must not contain @Skip nor @include on root selection set" by @dondonz in #3917
- Bump org.junit.jupiter:junit-jupiter from 5.12.1 to 5.12.2 by @dependabot[bot] in #3915
- Bump com.google.code.gson:gson from 2.12.1 to 2.13.0 by @dependabot[bot] in #3914
- Bump io.projectreactor:reactor-core from 3.7.4 to 3.7.5 by @dependabot[bot] in #3923
- Large in memory query benchmark by @bbakerman in #3921
- Bad naming in runner by @bbakerman in #3928
- Bump com.google.code.gson:gson from 2.13.0 to 2.13.1 by @dependabot[bot] in #3937
- Bump com.fasterxml.jackson.core:jackson-databind from 2.18.3 to 2.19.0 by @dependabot[bot] in #3936
- avoid wrapping materialized fieldValueObject in a CompletableFuture by @samuelAndalon in #3943
- Test by @andimarek in #3946
- Test by @andimarek-atlassian in #3947
- reduce forks to 2 to make perf tests faster by @andimarek in #3948
- ResponseMapFactory #3857 by @dfa1 in #3894
- OSGI - Make org.jspecify.* imports optional by @schulm in #3949
- Specify nullness for some
graphql.schema.idlclasses by @mk868 in #3895 - fix case when a fragment is deferred and non deferred at the same time for overlapping fields by @andimarek in #3953
- Make JSpecify optional import more specific by @dondonz in #3959
- Retriveing singleton property fetchers will not create DataFetcherFactoryEnvironment objects by @bbakerman in #3942
- ExecutionStrategyParameters now has a direct transform without a Builder by @bbakerman in #3935
- ExecutionStepInfo now has a direct transform without a Builder by @bbakerman in #3934
- FpKit now longer uses streams for performance reasons by @bbakerman in #3932
- Implement toString/hashCode/equals for DataFetcherResult by @AlexandreCarlton in #3964
- add defer test case by @andimarek in #3967
- Add DataLoader 5.0.0 by @dondonz in #3958
- Introduce a filter and map imperative method to replace .stream() calls by @bbakerman in #3931
- Removing some of the Optional.map() and .stream() for performance reasons by @bbakerman in #3930
- Stop creating NonNullableFieldValidator every for every object or list field by @bbakerman in #3929
- Enable DataLoader chaining (nesting) by @andimarek in #3872
- Avoid rare TCK test failure by @andimarek in #3975
- Bump com.tngtech.archunit:archunit-junit5 from 1.4.0 to 1.4.1 by @dependabot[bot] in #3957
- A generalised configuration mechanism by @bbakerman in #3945
- update gradle wrapper validation by @andimarek in #3982
- Bump io.projectreactor:reactor-core from 3.7.5 to 3.7.6 by @dependabot[bot] in #3977
- deterministic SourceLocation serialization by @jbellenger in #3987
- make dataloader work inside defer blocks by @andimarek in #3980
- Bump EnricoMi/publish-unit-test-result-action from 2.19.0 to 2.20.0 by @dependabot[bot] in #3990
- Add ArchUnit rule to ban javax & JetBrains nullability annotations by @dondonz in #3985
- Query generator by @felipe-gdr in #3979
- upgrade antlr by @andimarek in #3997
- a bit more efficient load in case the strategy doesn't fit by @andimarek in #4001
- Bump org.apache.groovy:groovy-json from 4.0.26 to 4.0.27 by @dependabot[bot] in #3998
- Bump org.junit.jupiter:junit-jupiter from 5.12.2 to 5.13.0 by @dependabot[bot] in #3999
- Response factory as config by @bbakerman in #3950
- Bump org.apache.groovy:groovy from 4.0.26 to 4.0.27 by @dependabot[bot] in #4000
- minimize work done when chained dataloaders are disabled by @andimarek in #4003
- ensure DFEImpl graphql context is never n...
25.0.beta-9
This is another beta release for the upcoming version 25.
A word of warning
While all features are tested and we consider them ready to be used, we don't guarantee that this is a stable version: this means there will be more breaking changes until we reach 25.0.
This version is intended for testing and providing feedback to the GraphQL Java team.
What's Changed
- Bump gradle/actions from 4 to 5 by @dependabot[bot] in #4132
- Memoize ResultPath level by @AlexandreCarlton in #4135
- More Chained DataLoaders performance improvements by @andimarek in #4136
Full Changelog: v25.0.beta-7...v25.0.beta-9
25.0.beta-8
This is another beta release for the upcoming version 25.
It contains a new Data Loader dispatching strategy ... see #4130
A word of warning
While all features are tested and we consider them ready to be used, we don't guarantee that this is a stable version: this means there will be more breaking changes until we reach 25.0.
This version is intended for testing and providing feedback to the GraphQL Java team.
What's Changed
- Bump com.google.errorprone:error_prone_core from 2.41.0 to 2.42.0 by @dependabot[bot] in #4125
- 5.0.3 version of dataloader by @bbakerman in #4126
- Per level tracking simplification and performance improvements by @andimarek in #4128
- cleanup and comments for dataloader tracking by @andimarek in #4129
- Bump com.uber.nullaway:nullaway from 0.12.9 to 0.12.10 by @dependabot[bot] in #4124
- New Exhaustion based data loader dispatching strategy by @andimarek in #4130
Full Changelog: 25.0.beta-6...v25.0.beta-8
25.0.beta-7
This is another beta release for the upcoming version 25.
24.3
This small bug fix brings in java-dataloader 5.0.3 which itself has a fix such that the Kotlin stdlib is not included a POM dependency
See https://github.com/graphql-java/java-dataloader/releases/tag/v5.0.3 for more details
What's Changed
- Backport new Sonatype credentials by @dondonz in #4061
- 5.0.3 version of dataloader on 24.x by @bbakerman in #4127
Full Changelog: v24.2...v24.3
25.0.beta-6
This is another beta release for the upcoming version 25.
It contains various changes, specifically performance improvements for the new chained dataloader feature.
A word of warning
While all features are tested and we consider them ready to be used, we don't guarantee that this is a stable version: this means there will be more breaking changes until we reach 25.0.
This version is intended for testing and providing feedback to the GraphQL Java team.
What's Changed
- MergedField single field support by @bbakerman in #4056
- Prohibit JMH tests from having more than 2 forks by @dondonz in #4075
- Remove unused imports by @ngocnhan-tran1996 in #4078
- Require JSpecify annotations on new Public API and Experimental API classes by @dondonz in #3892
- Specify nullness for nodes in the
graphql.languagepackage by @mk868 in #3899 - Update badges and add book link by @dondonz in #4079
- Bump com.gradleup.shadow from 8.3.8 to 9.0.1 by @dependabot[bot] in #4080
- Fix IncrementalExecutionResult.transform() to preserve incremental fields by @AndreaRomani in #4073
- Type extension field name uniqueness is checked only once by @bbakerman in #4076
- Bump com.uber.nullaway:nullaway from 0.12.7 to 0.12.8 by @dependabot[bot] in #4081
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #4082
- Fixed deferred support to have proper Instrumentation by @bbakerman in #4083
- Prohibit Map.of and provide alternative methods by @dondonz in #4086
- Bump io.projectreactor:reactor-core from 3.7.8 to 3.7.9 by @dependabot[bot] in #4090
- Bump com.gradleup.shadow from 9.0.1 to 9.0.2 by @dependabot[bot] in #4091
- Bump org.eclipse.jetty:jetty-server from 11.0.25 to 11.0.26 by @dependabot[bot] in #4092
- Bump org.jetbrains.kotlin.jvm from 2.2.0 to 2.2.10 by @dependabot[bot] in #4093
- Bump net.bytebuddy:byte-buddy from 1.17.6 to 1.17.7 by @dependabot[bot] in #4094
- Add
@NullUnmarkedto builders by @dondonz in #4087 - Try revert this shadow change with JMH debugging by @dondonz in #4095
- Bump com.uber.nullaway:nullaway from 0.12.8 to 0.12.9 by @dependabot[bot] in #4100
- Bump actions/setup-java from 4 to 5 by @dependabot[bot] in #4101
- Bump actions/stale from 9 to 10 by @dependabot[bot] in #4110
- Bump aws-actions/configure-aws-credentials from 4 to 5 by @dependabot[bot] in #4109
- Bump com.fasterxml.jackson.core:jackson-databind from 2.19.2 to 2.20.0 by @dependabot[bot] in #4106
- Removed ' character from introspection messages by @bbakerman in #4112
- Dont include Kotlin stdlib as a dependency by @bbakerman in #4113
- Bump io.projectreactor:reactor-core from 3.7.9 to 3.7.11 by @dependabot[bot] in #4117
- Bump org.jetbrains.kotlin.jvm from 2.2.10 to 2.2.20 by @dependabot[bot] in #4116
- Bump com.google.code.gson:gson from 2.13.1 to 2.13.2 by @dependabot[bot] in #4114
- Chained dl performance improvements with no locking by @andimarek in #4123
- chained data loader performance improvements by @andimarek in #4122
New Contributors
- @AndreaRomani made their first contribution in #4073
Full Changelog: v25.0.beta-5...25.0.beta-6
25.0.beta-5
This is another beta release for the upcoming version 25.
This beta-5 release includes improvements to the Profiler to make it easier to use and analyse. More documentation on the Profiler is to come.
A word of warning
While all features are tested and we consider them ready to be used, we don't guarantee that this is a stable version: this means there will be more breaking changes until we reach 25.0.
This version is intended for testing and providing feedback to the GraphQL Java team.
What's Changed
- Bump org.apache.groovy:groovy from 4.0.27 to 4.0.28 by @dependabot[bot] in #4066
- Bump com.fasterxml.jackson.core:jackson-databind from 2.19.1 to 2.19.2 by @dependabot[bot] in #4065
- Bump com.graphql-java:java-dataloader from 5.0.1 to 5.0.2 by @dependabot[bot] in #4064
- Bump io.projectreactor:reactor-core from 3.7.7 to 3.7.8 by @dependabot[bot] in #4062
- Bump com.google.errorprone:error_prone_core from 2.40.0 to 2.41.0 by @dependabot[bot] in #4067
- A smidge faster unwrap non-null by @bbakerman in #4059
- comment out the processor by default by @andimarek in #4071
- cleanup of no longer used Agent class by @andimarek in #4070
- Profiler tweaks for JSON serialisation by @dondonz in #4068
Full Changelog: v25.0.beta-4...v25.0.beta-5
25.0.beta-4
This is another beta release for the upcoming version 25.
The key change in this beta-4 release is a change to "Delayed" DataLoaders to greatly simplify the use of this feature. In an earlier beta release we tried out a "batch window" for DataLoaders depending on an async function, but in testing we've found this adds complexity, particularly if a server is not already using a ScheduledExecutorService. Note this does not affect the "Chained" DataLoader case where one DataLoader is dependent on another DataLoader in the same DataFetcher. More documentation is to come.
A word of warning
While all features are tested and we consider them ready to be used, we don't guarantee that this is a stable version: this means there will be more breaking changes until we reach 25.0.
This version is intended for testing and providing feedback to the GraphQL Java team.
What's Changed
- Support null query when running APQ request by @timward60 in #4049
- fix repeat until failure usage by @andimarek in #4054
- simplify delayed dataloader dispatching by not using a batch window by @andimarek in #4055
- Possibility to run JMH benchmarks without JAR build by @dfa1 in #4057
- Removing the GraphQL java agent by @andimarek in #4058
Full Changelog: v25.0-beta-3...v25.0.beta-4
24.2
This is a small bugfix release, to use the latest version of DataLoader that includes nullability annotation improvements. Thanks to the community to providing feedback.
See https://github.com/graphql-java/java-dataloader/releases/tag/v5.0.2 and https://github.com/graphql-java/java-dataloader/releases/tag/v5.0.1 for the details
What's Changed
Full Changelog: v24.1...v24.2
25.0.beta-3
This is another beta release for the upcoming version 25.
The key change in this beta-3 release is the addition of the Profiler, which will track interesting execution information such as DataLoader dispatch points, DataFetcher usage, and count of materialised values. You can opt into this via ExecutionInput. We'll have more documentation available ahead of the official release of v25.
A word of warning
While all features are tested and we consider them ready to be used, we don't guarantee that this is a stable version: this means there will be more breaking changes until we reach 25.0.
This version is intended for testing and providing feedback to the GraphQL Java team.
What's Changed
- Bump com.google.errorprone:error_prone_core from 2.39.0 to 2.40.0 by @dependabot[bot] in #4052
- adding Profiler by @andimarek in #3976
Full Changelog: v25.0.beta-2...v25.0-beta-3