Skip to content

referenceText should not emit invalid MQL for unsafe field names #709

Closed

Description

@hanhan761

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.

Activity

  1. added a commit that references this issue on Jun 23, 2026
    9cd1eb6
  2. added a commit that references this issue on Jun 23, 2026
    1e1b1c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions