Problem
toFieldCompletionItems() currently emits referenceText as $ + field path for every field. That breaks for field names that are not safe as a plain $field reference, such as:
order-items
my field
say"hi"
Expected: unsafe names should not produce a broken aggregation reference.
Current: the completion data exposes an invalid referenceText, which can lead to bad MQL if consumed directly.
Notes
This was documented as future work in src/utils/json/data-api/autocomplete/future-work.md.
Problem
toFieldCompletionItems()currently emitsreferenceTextas$+ field path for every field. That breaks for field names that are not safe as a plain$fieldreference, such as:order-itemsmy fieldsay"hi"Expected: unsafe names should not produce a broken aggregation reference.
Current: the completion data exposes an invalid
referenceText, which can lead to bad MQL if consumed directly.Notes
This was documented as future work in
src/utils/json/data-api/autocomplete/future-work.md.