Skip to content

Deprecate ArgumentValue<T> in favor of FieldValue<T> #1187

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

Closed
bclozel opened this issue Apr 11, 2025 · 1 comment
Closed

Deprecate ArgumentValue<T> in favor of FieldValue<T> #1187

bclozel opened this issue Apr 11, 2025 · 1 comment
Assignees
Labels
in: core Issues related to config and core support status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@bclozel
Copy link
Member

bclozel commented Apr 11, 2025

I noticed that our current ArgumentValue<T> support is located in the org.springframework.graphql.data package and focusing on binding data as controller method arguments. But we are already doing more than that:

ArgumentValue is also supported as a field within the object structure of an @Argument method parameter, either initialized via a constructor argument or via a setter, including as a field of an object nested at any level below the top level object.

With #1174 and in general the GraphQL client use case, we should probably generalize this concept as FieldValue<T>, mostly copying the existing code to a new class and using this opportunity to use a more appropriate name and a different package, probably org.springframework.graphql.

If we decide to do so, we would @Deprecate ArgumentValue in favor of FieldValue and remove it entirely in a future version, probably 2.0.

Most of what's described here is already done in a branch, but we'll need to discuss this as a team and test this arrangement with GraphQL clients.

@bclozel bclozel added in: core Issues related to config and core support type: enhancement A general enhancement labels Apr 11, 2025
@bclozel bclozel added this to the 1.4.0-RC1 milestone Apr 11, 2025
@bclozel bclozel self-assigned this Apr 11, 2025
bclozel added a commit that referenced this issue Apr 15, 2025
@bclozel bclozel removed this from the 1.4.0-RC1 milestone Apr 15, 2025
@bclozel bclozel added the status: declined A suggestion or change that we don't feel we should currently apply label Apr 15, 2025
@bclozel
Copy link
Member Author

bclozel commented Apr 18, 2025

This has been reverted in favor of exploring alternatives with #569

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues related to config and core support status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant