Closed
Description
Hello there
When @ContextValue#name
is omitted within a @SchemaMapping
method parameter.
The ContextValueMethodArgumentResolver#getContextValueName
, will retrieve the context value based on the parameter.getParameterName()
.
@QueryMapping
public Client client(@ContextValue UUID integrationToken) // Correctly injects the integrationToken context value
When @ContextValue#name
is omitted within a @BatchMapping
method parameter.
The ContextValueMethodArgumentResolver#getContextValueName
parameter.getParameterName()
returns null, and an exception is thrown. When @ContextValue#name
is set, it is correctly injected.
@BatchMapping
public Callable<Map<Client, UUID>> advisorId(List<Client> clients,
@ContextValue("integrationToken") UUID integrationToken
// @ContextValue UUID integrationToken -> throws an exception
Should @ContextValue
be consistent between *Mapping
annotations?
I have reproduced it here
Many thanks