Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow binding full arguments map onto an object #258

Closed
marceloverdijk opened this issue Jan 15, 2022 · 1 comment
Closed

Allow binding full arguments map onto an object #258

marceloverdijk opened this issue Jan 15, 2022 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@marceloverdijk
Copy link
Contributor

Having a Query mapping like:

public Page<Season> seasons(@Argument Pageable pageable) {. .. }

and a corresponding class:

@Data
public class Pageable {

    private int first;
    private int offset
}

when querying:

query {
  seasons(first:5, offset:10) {
    ..
  }
}

the pageable object in the controller is null unfortunately.
I think the reason is that it will look for a pageable input variable and will not look for the individual first and offset fields.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 15, 2022
@rstoyanchev rstoyanchev changed the title Custom @Argument object to access root properties does not work Allow binding full arguments map onto an object Jan 17, 2022
@rstoyanchev rstoyanchev added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 17, 2022
@rstoyanchev rstoyanchev added this to the 1.0 Backlog milestone Jan 17, 2022
@rstoyanchev
Copy link
Contributor

Yes, @Argument looks for a name, either from the annotation or from the method parameter name. We need some way to express that not one but all arguments should be the source. Perhaps a separate annotation @Arguments.

@rstoyanchev rstoyanchev modified the milestones: 1.0 Backlog, 1.0.0-M6 Jan 20, 2022
@rstoyanchev rstoyanchev self-assigned this Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants