Closed renovate[bot] closed 7 months ago
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠ Warning: custom changes will be lost.
This PR contains the following updates:
17.3
->230521-nf-execution
Release Notes
graphql-java/graphql-java
### [`v20.2`](https://togithub.com/graphql-java/graphql-java/releases/tag/v20.2): 20.2 This is a security bugfix release containing [#3148](https://togithub.com/graphql-java/graphql-java/issues/3148), which adds a limit to the number of characters used in an operation. There are no breaking changes in this release. #### What's Changed - Diffing fixes 2 by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3146](https://togithub.com/graphql-java/graphql-java/pull/3146) - Fix argument added to new type by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3150](https://togithub.com/graphql-java/graphql-java/pull/3150) - Show test failures in builds by [@bbakerman](https://togithub.com/bbakerman) in [https://github.com/graphql-java/graphql-java/pull/3151](https://togithub.com/graphql-java/graphql-java/pull/3151) - Fix applied argument deleted on field by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3154](https://togithub.com/graphql-java/graphql-java/pull/3154) - Have a limit on how many characters are presented to the Parser by [@bbakerman](https://togithub.com/bbakerman) in [https://github.com/graphql-java/graphql-java/pull/3148](https://togithub.com/graphql-java/graphql-java/pull/3148) **Full Changelog**: https://github.com/graphql-java/graphql-java/compare/v20.1...v20.2 ### [`v20.1`](https://togithub.com/graphql-java/graphql-java/releases/tag/v20.1): 20.1 [Compare Source](https://togithub.com/graphql-java/graphql-java/compare/v20.0...v20.1) This is a feature and bugfix release. There are **no breaking changes** in this release. This release continues to use Java 8. Thanks to everyone in the community for helping us with this release. Thanks for your PRs, issues, and discussions! #### Security fix This release includes a security fix [#3112](https://togithub.com/graphql-java/graphql-java/issues/3112) which adds a limit to the depth of grammar rules, to prevent stack overflow. #### Highlights [#3095](https://togithub.com/graphql-java/graphql-java/issues/3095) improves resiliency to class loader problems with `LambdaMetafactory`. [#3049](https://togithub.com/graphql-java/graphql-java/issues/3049) adds an extensions builder and merger. #### Release policy We have formalised our release schedule to give the community a better idea of when to expect releases, what will be contained within them, and when important fixes will be backported. See the full details at https://www.graphql-java.com/blog/release-policy #### What's Changed - docs: update badges for v20 release by [@setchy](https://togithub.com/setchy) in [https://github.com/graphql-java/graphql-java/pull/3047](https://togithub.com/graphql-java/graphql-java/pull/3047) - Update FieldValidationInstrumentation.java by [@kfwerf](https://togithub.com/kfwerf) in [https://github.com/graphql-java/graphql-java/pull/3066](https://togithub.com/graphql-java/graphql-java/pull/3066) - Update vulnerability reporting instructions by [@dondonz](https://togithub.com/dondonz) in [https://github.com/graphql-java/graphql-java/pull/3070](https://togithub.com/graphql-java/graphql-java/pull/3070) - Fix extend schema directives ANTLR rule by [@dondonz](https://togithub.com/dondonz) in [https://github.com/graphql-java/graphql-java/pull/3071](https://togithub.com/graphql-java/graphql-java/pull/3071) - Allow users to disable MultiSourceReader trackData through ParserOptions by [@AntaresS](https://togithub.com/AntaresS) in [https://github.com/graphql-java/graphql-java/pull/3062](https://togithub.com/graphql-java/graphql-java/pull/3062) - Add missing getter and fix name consistency by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3073](https://togithub.com/graphql-java/graphql-java/pull/3073) - use toolchain to specify the java version by [@andimarek](https://togithub.com/andimarek) in [https://github.com/graphql-java/graphql-java/pull/3075](https://togithub.com/graphql-java/graphql-java/pull/3075) - Fix isNameChanged by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3076](https://togithub.com/graphql-java/graphql-java/pull/3076) - Update instrumentation example in documentation by [@dondonz](https://togithub.com/dondonz) in [https://github.com/graphql-java/graphql-java/pull/3078](https://togithub.com/graphql-java/graphql-java/pull/3078) - Reuse ExecutionStrategyInstrumentationContext.NOOP in DataLoaderDispatcherInstrumentation by [@dfa1](https://togithub.com/dfa1) in [https://github.com/graphql-java/graphql-java/pull/3068](https://togithub.com/graphql-java/graphql-java/pull/3068) - Add missing this keyword for readability by [@cookieMr](https://togithub.com/cookieMr) in [https://github.com/graphql-java/graphql-java/pull/3067](https://togithub.com/graphql-java/graphql-java/pull/3067) - defaulting the deprecated methods in Coercing by [@bbakerman](https://togithub.com/bbakerman) in [https://github.com/graphql-java/graphql-java/pull/3063](https://togithub.com/graphql-java/graphql-java/pull/3063) - Add missing detail by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3079](https://togithub.com/graphql-java/graphql-java/pull/3079) - Updating the JavaDoc http links by [@bbakerman](https://togithub.com/bbakerman) in [https://github.com/graphql-java/graphql-java/pull/3083](https://togithub.com/graphql-java/graphql-java/pull/3083) - An Extensions Builder by [@bbakerman](https://togithub.com/bbakerman) in [https://github.com/graphql-java/graphql-java/pull/3049](https://togithub.com/graphql-java/graphql-java/pull/3049) - Use ImmutableList.builderWithExpectedSize in ImmutableKit.mapAndDropNulls too by [@dfa1](https://togithub.com/dfa1) in [https://github.com/graphql-java/graphql-java/pull/3081](https://togithub.com/graphql-java/graphql-java/pull/3081) - Resolve TypeReferences in schema applied directives by [@kaqqao](https://togithub.com/kaqqao) in [https://github.com/graphql-java/graphql-java/pull/3054](https://togithub.com/graphql-java/graphql-java/pull/3054) - Remove sun.misc.\* from MANIFEST.MF by [@dondonz](https://togithub.com/dondonz) in [https://github.com/graphql-java/graphql-java/pull/3091](https://togithub.com/graphql-java/graphql-java/pull/3091) - Replace javax nullable annotations with JetBrains equivalent by [@dondonz](https://togithub.com/dondonz) in [https://github.com/graphql-java/graphql-java/pull/3093](https://togithub.com/graphql-java/graphql-java/pull/3093) - Ensured that the MANIFEST.MF files is the first entry in the JAR File by [@schaefa](https://togithub.com/schaefa) in [https://github.com/graphql-java/graphql-java/pull/3097](https://togithub.com/graphql-java/graphql-java/pull/3097) - Fix type change and directive deletion problems in schema diffing by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3102](https://togithub.com/graphql-java/graphql-java/pull/3102) - Handle enum value rename by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3103](https://togithub.com/graphql-java/graphql-java/pull/3103) - Bugfix: do not use default operation name types if not included in schema definition block by [@dondonz](https://togithub.com/dondonz) in [https://github.com/graphql-java/graphql-java/pull/3088](https://togithub.com/graphql-java/graphql-java/pull/3088) - Adding ExtensionsBuilder in the graphql context by default by [@bbakerman](https://togithub.com/bbakerman) in [https://github.com/graphql-java/graphql-java/pull/3085](https://togithub.com/graphql-java/graphql-java/pull/3085) - Meta Lambda failures - make the code more resilient to class loader challenges by [@bbakerman](https://togithub.com/bbakerman) in [https://github.com/graphql-java/graphql-java/pull/3095](https://togithub.com/graphql-java/graphql-java/pull/3095) - Gracefully returning null in cases of UnresolvedTypeException by [@ahmadizm](https://togithub.com/ahmadizm) in [https://github.com/graphql-java/graphql-java/pull/3122](https://togithub.com/graphql-java/graphql-java/pull/3122) - Add dependabot configuration by [@yeikel](https://togithub.com/yeikel) in [https://github.com/graphql-java/graphql-java/pull/3115](https://togithub.com/graphql-java/graphql-java/pull/3115) - Bump org.jetbrains:annotations from 23.0.0 to 24.0.1 by [@dependabot](https://togithub.com/dependabot) in [https://github.com/graphql-java/graphql-java/pull/3125](https://togithub.com/graphql-java/graphql-java/pull/3125) - Remove unused dependencies by [@dondonz](https://togithub.com/dondonz) in [https://github.com/graphql-java/graphql-java/pull/3132](https://togithub.com/graphql-java/graphql-java/pull/3132) - Bump actions/checkout from 1 to 3 by [@dependabot](https://togithub.com/dependabot) in [https://github.com/graphql-java/graphql-java/pull/3126](https://togithub.com/graphql-java/graphql-java/pull/3126) - Bump google-github-actions/auth from 0.4.0 to 1.0.0 by [@dependabot](https://togithub.com/dependabot) in [https://github.com/graphql-java/graphql-java/pull/3129](https://togithub.com/graphql-java/graphql-java/pull/3129) - Bump org.codehaus.groovy:groovy from 3.0.9 to 3.0.16 by [@dependabot](https://togithub.com/dependabot) in [https://github.com/graphql-java/graphql-java/pull/3131](https://togithub.com/graphql-java/graphql-java/pull/3131) - Add manual stop on schema diffing algorithm by [@gnawf](https://togithub.com/gnawf) in [https://github.com/graphql-java/graphql-java/pull/3119](https://togithub.com/graphql-java/graphql-java/pull/3119) - Preventing stack overflow exceptions via limiting the depth of the parser rules by [@bbakerman](https://togithub.com/bbakerman) in [https://github.com/graphql-java/graphql-java/pull/3112](https://togithub.com/graphql-java/graphql-java/pull/3112) - UniqueObjectFieldName validation rule ([#1806](https://togithub.com/graphql-java/graphql-java/issues/1806)) by [@ashatch](https://togithub.com/ashatch) in [https://github.com/graphql-java/graphql-java/pull/3094](https://togithub.com/graphql-java/graphql-java/pull/3094) #### New Contributors - [@kfwerf](https://togithub.com/kfwerf) made their first contribution in [https://github.com/graphql-java/graphql-java/pull/3066](https://togithub.com/graphql-java/graphql-java/pull/3066) - [@AntaresS](https://togithub.com/AntaresS) made their first contribution in [https://github.com/graphql-java/graphql-java/pull/3062](https://togithub.com/graphql-java/graphql-java/pull/3062) - [@ahmadizm](https://togithub.com/ahmadizm) made their first contribution in [https://github.com/graphql-java/graphql-java/pull/3122](https://togithub.com/graphql-java/graphql-java/pull/3122) - [@yeikel](https://togithub.com/yeikel) made their first contribution in [https://github.com/graphql-java/graphql-java/pull/3115](https://togithub.com/graphql-java/graphql-java/pull/3115) - [@dependabot](https://togithub.com/dependabot) made their first contribution in [https://github.com/graphql-java/graphql-java/pull/3125](https://togithub.com/graphql-java/graphql-java/pull/3125) - [@ashatch](https://togithub.com/ashatch) made their first contribution in [https://github.com/graphql-java/graphql-java/pull/3094](https://togithub.com/graphql-java/graphql-java/pull/3094) **Full Changelog**: https://github.com/graphql-java/graphql-java/compare/v20.0...v20.1 ### [`v20.0`](https://togithub.com/graphql-java/graphql-java/releases/tag/v20.0): 20.0 We are pleased to announce the release of graphql-java 20.0. Special thanks to each of the 200+ contributors over the years, who have made this milestone possible. ### Breaking changes #### Aligning `parseValue` coercion with JS reference implementation We have made changes to String, Boolean, Float, and Int `parseValue` coercion, to be consistent with the reference JS implementation. The key change is `parseValue` is now stricter on accepted inputs. - String `parseValue` now requires input is of type `String`. For example, a Number input `123` or a Boolean input `true` will no longer be accepted. - Boolean `parseValue` now requires input is of type `Boolean`. For example, a String input `"true"` will no longer be accepted. - Float `parseValue` now requires input is of type `Number`. For example, a String input `"3.14"` will no longer be accepted. - Int `parseValue` now requires input is of type `Number`. For example, a String input `"42"` will no longer be accepted. String `parseValue` changes: [https://github.com/graphql-java/graphql-java/pull/3030](https://togithub.com/graphql-java/graphql-java/pull/3030) Boolean, Float, and Int `parseValue` changes: [https://github.com/graphql-java/graphql-java/pull/3042](https://togithub.com/graphql-java/graphql-java/pull/3042) JS reference implementation: https://github.com/graphql/graphql-js/blob/main/src/type/scalars.ts ### Notable Changes #### Record Like Property Fetching Support We have now added the ability to find properties via "Record like" naming. We call it "Record like" based on Java 14 `record` classes but in fact any class with a method named directly as the graphql field is named will work. If you had this graphql object type declared ```graphql type Person { name : String address : String } ``` then this Java `record` would be supported for fetching values via the method names `name()` and `address()` ```java public record Person (String name, String address) ``` and equally a non record class like this would also work ```java public class Person { public String name() { return "Harry Potter"; } public String address() { return "4 Privet Drive, Little Whinging"; } } ``` We still have Java Bean (aka POJO) getter naming support like `public String getName()` however now the "record like" `name()` method will be used in preference and then the `getName()` methods will be used if that's not present. This means there is a new behavior if you had weird POJOs likes this ```java public class WeirdPerson { public String name() { return "Harry Potter"; } public String getName() { return "Tom Riddle"; } } ``` A property fetch for `name` will now return `Harry Potter` and not `Tom Riddle` as it previously would have. This is a **behavioral breaking change** but on balance we think this behavior is the most correct going forward. [https://github.com/graphql-java/graphql-java/pull/2994](https://togithub.com/graphql-java/graphql-java/pull/2994) #### Improved Data Fetching The `PropertyDataFetcher` class is the most common data fetcher used in graphql-java. It uses Java reflection to get field values from objects based on field name. This was logically the following ```java Method method = findMethod(fieldname); method.invoke(object); ``` with the method lookup cached for performance reasons. However there is mechanism in the JVM that provides even faster object reflective access. See https://wttech.blog/blog/2020/method-handles-and-lambda-metafactory/ https://www.optaplanner.org/blog/2018/01/09/JavaReflectionButMuchFaster.html `java.lang.invoke.LambdaMetafactory#metafactory` is an arcane mechanism that can be used to create virtual method lambdas that give fast access to call object methods. It turns out to be significantly faster that Java reflection and only marginally slower that directly invoking a method. If you use `PropertyDataFetcher` a lot (and chances are you do) then this should give improved performance. The raw benchmarks are as follows Java 8 Benchmark Mode Cnt Score Error Units GetterAccessBenchmark.measureDirectAccess thrpt 15 81199548.105 ± 2717206.756 ops/s 0% slower (baseline) GetterAccessBenchmark.measureLambdaAccess thrpt 15 79622345.446 ± 1183553.379 ops/s 2% slower GetterAccessBenchmark.measureReflectionAccess thrpt 15 46102664.133 ± 4091595.318 ops/s 50% slower Java 17 Benchmark Mode Cnt Score Error Units GetterAccessBenchmark.measureDirectAccess thrpt 15 458411420.717 ± 34329506.990 ops/s 0% GetterAccessBenchmark.measureLambdaAccess thrpt 15 334158880.091 ± 10666070.698 ops/s 27% slower GetterAccessBenchmark.measureReflectionAccess thrpt 15 63181868.566 ± 3887367.970 ops/s 86% slower It's worth noting that while the headline numbers here look impressive, the property fetching represents a smaller portion of what happens during graphql engine execution. It probably won't be enough to keep Elon Musk happy but all performance improvements help and at scale they help the most. #### Lightweight Data Fetchers A `DataFetcher` gets invoked with a calling environment context object called `graphql.schema.DataFetchingEnvironment`. This is quite a rich object that contains all sorts of useful information. However simple (aka trivial) data fetchers like `PropertyDataFetcher` they don't need access to such a rich object. They just need the source object, the field name and the field type To marginally help performance, we have introduced a `graphql.schema.LightDataFetcher` for this use case ```java public interface LightDataFetcherConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.