AbstractConvenience getter that returns the class only when the source type is a Class (not a RelationType). Use this in code paths that are Class-specific (milestoning, explorer tree, graph-fetch, etc.).
This flag is for turning on/off DnD support from projection panel to filter panel, and will be leveraged when the concepts of workflows are introduced into query builder.
Builds the execution context expression (e.g. from()) for the lambda function. Subclasses can override this to customize the execution context building.
Builds the raw lambda intended for persistence (saving to query store). The default implementation delegates to buildQuery(). Subclasses that embed execution context inside the lambda body (e.g. DataProductQueryBuilderState) should override this to return a plain lambda without that wrapping, since the execution context is persisted separately via query.executionContext.
Gets the execution context the query builder has currently resolved to: the class being queried and the mapping/runtime it will execute against.
This is deliberately distinct from sourceInfo, which records what the
builder was opened with (the route). For a mapping-sourced query both are
populated and initially identical, so a divergence means the user switched;
for a data space / data product / service query only this side carries a
mapping and runtime, because the entry point resolves to one.
Degrades gracefully — whichever of class / mapping / runtime are known get
reported, so events that fire while the user is still setting up (picking a
class before a mapping, say) are not blank. Returns undefined only when
none of the three has resolved.
Aggregates extra telemetry metadata contributed by application plugins
via getExtraQueryBuilderTelemetryMetadataProviders. Callers spread the
result into their event payloads so telemetry helpers stay free of
plugin-specific fields (e.g. agent chat trace ids).
Gets a lightweight snapshot of the current query builder authoring state (fetch structure kind, filter/parameter/constant counts, milestoning / watermark configuration, etc.) for telemetry payloads. Kept intentionally shape-only — no user values, no identifiers.
This method can be used to simplify the current query builder state to a basic one that can be used for testing or some special operations, see INTERNAL__BasicQueryBuilderState for more details
Reports that a query builder was opened, from whichever surface opened it. This is the canonical "a query builder exists" signal — hosts should prefer it over their own route-specific load events, which each cover only part of the population.
Deliberately called by the host once the builder is loaded, rather than
emitted from the constructor. The constructor runs before subclass field
initializers, so the execution context would be unresolved and the safeGet*
wrappers would silently report an empty envelope; it would also fire for
derived states such as INTERNAL__toBasicQueryBuilderState, which are
built on every data preview and are not user-facing opens.
extra carries host-specific supplementary fields (load timings, and for
Legend Query creators restoredFromRecent). It is untyped to keep this
package host-agnostic.
Optionalextra: Record<string, unknown>Process the provided query, and rebuild the query builder state.
Optionaloptions: {Prefer this over the raw getQueryInfo() method on the hot path of
execution telemetry.
Builds the shared telemetry envelope every query builder event carries: the
entry point the builder was opened with, spread flat, plus the execution
context it resolved to, nested under state. Spread this into a payload
rather than assembling the two halves by hand at each callsite.
Base query builder state with result panel hidden. This is useful for scenarios where the query builder is used only for query construction without execution/result display.