Context
src/GraphQl/Type/FieldsBuilder.php builds GraphQL arguments from two parallel sources today:
- Legacy
Operation::getFilters() (list of string filter ids) → getFilterArgs().
- Modern
Operation::getParameters() (QueryParameter collection) → getParameterArgs().
Both paths walk FilterInterface::getDescription(), normalize bracketed keys via parse_str, and emit InputObjectType trees — with different output shapes and divergent edge-case handling (see also #7953-adjacent bug around bracketed keys + object-form filters).
Proposal
Introduce an ArgumentParameter (working name) — a metadata-layer concept that marks "this parameter participates in the GraphQL schema" as first-class. FieldsBuilder then has a single source of truth and a single argument-building pass, instead of two divergent paths.
Sketch:
- A dedicated parameter subtype, or an explicit
graphQl: true|ArgumentDescriptor flag on QueryParameter.
Operation::getFilters() is normalized into synthetic ArgumentParameters for GraphQL, deprecating the dual code path inside FieldsBuilder.
FieldsBuilder only consumes ArgumentParameters.
Scope
- 4.4 / 5.0 — not a backport-friendly change.
- Touches metadata factories, schema builder, probably the resource extractors (PHP attribute / XML / YAML), and docs.
Why a note, not a plan
This issue exists so the idea is tracked. Real design happens later; the 4.3 branch only does the surgical bug fix + helper extraction.
Context
src/GraphQl/Type/FieldsBuilder.phpbuilds GraphQL arguments from two parallel sources today:Operation::getFilters()(list of string filter ids) →getFilterArgs().Operation::getParameters()(QueryParametercollection) →getParameterArgs().Both paths walk
FilterInterface::getDescription(), normalize bracketed keys viaparse_str, and emitInputObjectTypetrees — with different output shapes and divergent edge-case handling (see also #7953-adjacent bug around bracketed keys + object-form filters).Proposal
Introduce an
ArgumentParameter(working name) — a metadata-layer concept that marks "this parameter participates in the GraphQL schema" as first-class.FieldsBuilderthen has a single source of truth and a single argument-building pass, instead of two divergent paths.Sketch:
graphQl: true|ArgumentDescriptorflag onQueryParameter.Operation::getFilters()is normalized into syntheticArgumentParameters for GraphQL, deprecating the dual code path insideFieldsBuilder.FieldsBuilderonly consumesArgumentParameters.Scope
Why a note, not a plan
This issue exists so the idea is tracked. Real design happens later; the 4.3 branch only does the surgical bug fix + helper extraction.