Should I use ArgumentValue or Optional when I have a GraphQL Controller with an input parameter that can be nullable? Both approaches are valid, but what is the difference between ArgumentValue and Optional?
@QueryMapping
public String test(ArgumentValue<Integer> intValue) {
return testService.getData(intValue);
}
@QueryMapping
public String test(Optional<Integer> intValue) {
return testService.getData(intValue);
}