This is a temporary workaround to fix off-by-1 misalignment with
Spring Data, which uses 1-based offset values. Once the changes
in Spring Data become clear, we'll also adjust accordingly.
Closes gh-925
The presence of either "after" or "first" leads to forward pagination.
Else if either "before" or "last" leads to backward pagination.
Fall back on forward if none are provided at all.
In addition, a small adjustment to backward pagination. If a count
is not provided, use 1 rather than 0, to advance to previous item.
Closes gh-929
Rather than only checking for the presence of a property, also call
checkField on it. If it is a scalar then recursion stop anyway, but in the
unlikely event that it isn't, there are more fields to check.
Closes gh-934
Rather than passing a DataFetcher into checkField, determine the return type
externally and pass it in. That makes the method more generally useful, and
independent of how the associated type is determined, e.g. whether from a
DataFetcher return type or a corresponding Java property.
See gh-934
Prior to this commit, the `GraphQlObservationInstrumentation` would
always assume that local context instances are of type `GraphQLContext`.
This means that a custom context type would be overwritten with a
`GraphQLContext` that contains the current observation.
Instead, this commit ensures that a local context is contributed only if
none was present, or that we wrap the existing one only if it is a
`GraphQLContext` in the first place. If the parent data fetcher
contributes a custom context, the current observation will not be added.
Fixes gh-918
The QueryDsl and QBE data fetcher builders now accept a default count
and a function for a default position with awareness of the scroll
direction.
Closes gh-917
Both forward and backward scrolling needed adjustment.
For forward, we were not advancing by 1.
For backward, we were advancing by the count and 1 more than necessary.
Closes gh-916
Prior to this commit, the `ControllerAdvice` support would detect all
beans and exception handler methods, to put them in an ordered `TreeMap`
using the `OrderComparator.INSTANCE`. Doing so would naturally consider
beans with the same order as duplicates and would write a single entry
in the map. This effectively ignored many `ControllerAdvice` beans with
the same order (but one).
This commit removes the use of a `TreeMap` and instead uses a
`LinkedHashMap` and the insertion order for proper ordering.
Fixes gh-901