Skip to content

Support custom argument resolvers for @SchemaMapping methods #259

Closed as not planned
@marceloverdijk

Description

@marceloverdijk

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) {
    ..
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions