Closed as not planned
Description
As discussed in #250 this is feature request for support of custom argument resolvers in GraphQL controllers.
E.g. to support
@QueryMapping
public Page<Season> seasons(Pageable pageable) {
int first = pageable.getFirst();
int offset = pageable.getOffset();
..
}
The plain example as above could already be implemented using a @ProjectedPayload
@ProjectedPayload
public interface Pageable {
int getFirst();
int getOffset();
}
(Note: using the @Argument
annotation for above case does not work me, see #258)
But supporting custom argument resolvers could offer more flexibility I was looking for like the ability to use a custom @interface
to provide defaults , e.g.
@QueryMapping
public Page<Season> seasons(@PageableDefault(first=10, offset=0) Pageable pageable) {
..
}