The failure was in GraphQlWebSocketHandlerTests for WebMvc.
the subscriptionExists test checks that a second subscription with
same id will close the connection with 4409. It also checks that
2 messages have arrived (connection_init) and one message from the
first subscription. However, since message handling as async,
handling of the two subscriptions is concurrent, and the connection
may be closed before the first subscription is able to send.
This commit adjusts the message checks to be more lenient and
accept between 1 and 2 messages.
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
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
The defaults are now applied before the call to ScrollSubrange#create.
After is too late given that for offset positions, the direction may
switch from backward to forward.
Closes gh-900