Menu
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Enterprise
Open source
DataQuery interface
These are the common properties available to all queries in all datasources Specific implementations will *extend* this interface adding the required properties for the given context
Signature
typescript
export interface DataQuery
Import
typescript
import { DataQuery } from '@grafana/data';
Properties
Property | Type | Description |
---|---|---|
datasource | DataSourceRef | null | For mixed data sources the selected datasource is on the query level. For non mixed scenarios this is undefined. |
hide | boolean | true if query is disabled (ie should not be returned to the dashboard) |
key | string | Unique, guid like, string used in explore mode |
queryType | string | Specify the query flavor |
refId | string | A - Z |
datasource property
For mixed data sources the selected datasource is on the query level. For non mixed scenarios this is undefined.
Signature
typescript
datasource?: DataSourceRef | null;
hide property
true if query is disabled (ie should not be returned to the dashboard)
Signature
typescript
hide?: boolean;
key property
Unique, guid like, string used in explore mode
Signature
typescript
key?: string;
queryType property
Specify the query flavor
Signature
typescript
queryType?: string;
refId property
A - Z
Signature
typescript
refId: string;
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:

Getting started with the Grafana LGTM Stack
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.

Getting started with Grafana dashboard design (EMEA Timezone)
In this webinar, you'll learn how to design stylish and easily accessible Grafana dashboards that tell a story.

Unify your data with Grafana plugins: Datadog, Splunk, MongoDB, and more
In this webinar, learn how to leverage Grafana's plugin ecosystem for access to 80+ data sources, including plugins for Datadog, Splunk, MongoDB, and more.