dbt-labs / dbt-labs/dbt-semantic-interfaces

[Feature] expose config.meta on SavedQuery in the Semantic Layer GraphQL API

Open
#472 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
103
Forks
28
PR merge metrics
No merged PRs in 30d

Description

## Describe the feature

The `config.meta` field is supported on `saved_queries` in dbt YAML, but it is never surfaced through the Semantic Layer GraphQL API. The `savedQueries` query currently returns only `name`, `description`, `label`, `queryParams`, and `exports`. Requesting `config { meta }` returns:

```
Cannot query field 'config' on type 'SavedQuery'.
```

By contrast, `metricsPaginated` and `dimensionsPaginated` both expose `config { meta }` today.

The fix requires adding `config: Optional[SemanticLayerElementConfig]` to the `SavedQuery` protocol and its pydantic implementation here in `dbt-semantic-interfaces`, then propagating upward through:
- `dbt-labs/metricflow` -- `MFSavedQuery` engine model (`metricflow/engine/models.py`)
- `metricflow-server` (internal) -- `SavedQuery` Strawberry type (`mfs/gql/types.py`)

The `Metric` model is the reference implementation at every layer.

## Describe alternatives you've considered

Filtering saved queries by `name`, `label`, or `description` is the only current option, but those fields are human-readable strings and not designed for machine-readable routing metadata.

## Who will this benefit?

Anyone using `config.meta` on saved queries to tag them with workflow metadata (e.g. `team`, `cadence`, `environment`) who wants to filter or route saved queries programmatically -- for example, in scheduled data workflows or MCP-based tooling.

## Anything else?

Community thread where this was surfaced: https://getdbt.slack.com/archives/C08NGJYD563/p1782324792705029

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.