Skip to content

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

@bclozel

Description

@bclozel

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.

Metadata

Metadata

Assignees

Labels

in: coreIssues related to config and core supportstatus: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions