Builder implementations are intended to be package private and exposed
through interface methods, but the abstract class needs to be public
for alternative implementations.
Prior to this commit, return types declared by controller handlers that
were wrapped with `Optional` were not considered during the schema
analysis and would result in false positives in the schema inspection
report, stating that relevant fields were unmapped.
This is especially relevant for controller handlers returning optional
values from Spring Data repositories.
This commit ensures that `java.util.Optional` types are unwrapped and
that wrapped types are considered during the analysis.
Fixes gh-875
Prior to this commit, the `ConnectionFieldTypeVisitor` would return
`TraversalControl.ABORT` when a field with a parent Subscription type is
encountered. This is done because this visitor should not consider
fields under Subscription types as they are not candidates for
pagination. This would also completely abort the visiting of all fields
under Subscription types, for all other visitors. As a result, this
prevents the decoration of data fetchers by the `ContextTypeVisitor` and
leads to missing context information (security or observability).
This only applies to 21.x GraphQL Java versions, as a bug was hiding
this behavior in previous versions.
This commit ensures that the `ConnectionFieldTypeVisitor` ignores fields
located under Subscription operations but always return
`TraversalControl.CONTINUE` to not completely ignore this part of the
schema.
Fixes gh-861
`isPresent()` returns false, even when an explicit `null` value is
supplied. By checking `isOmitted()` instead, we can correctly use
validation annotations like `@NotBlank`.
Closes gh-842
1. Offset to be advanced back by 1 more than the count in order to
exclude the item at the specified offset.
2. Count to be adjusted down if offset is too low.
3. Count to be set to 0 if offset is 0.
See gh-840
Prior to this commit, the embedded reachability metadata for GraalVM
would declare a reflection hint for `GraphQlWebSocketMessage` when the
RSocket or WebSocket clients are reachable.
The `CodecDelegate` relies on this message class to test codecs and
detect a JSON-capable instance. This is true for all supported
GraphQlClient implementations.
This commit revisits the embedded reachability metadata to:
* allow reflection on `GraphQlWebSocketMessage` if any client extending
`AbstractGraphQlClientBuilder` is available
* allow reflection on `GraphQlWebSocketMessage` if a
`GraphQlWebSocketHandler` is reachable
Fixes gh-825
Prior to this commit, the `AnnotatedControllerExceptionResolver` would
scan the application context for `@ControllerAdvice` beans and cache the
results in an unordered Map. It's later iterating over the entries to
resolve an exception handler at runtime.
This commit ensures that such entries are now stored in an ordered map,
using the `OrderComparator.INSTANCE` comparator. `ControllerAdvice`
beans will be iterated over the order specified by the `Ordered`
contract or the `@Order` annotation.
Fixes gh-830