2020-02-26 17:03:53 +08:00
+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "DataQuery"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## DataQuery interface
2020-04-21 16:41:50 +08:00
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
2020-02-26 17:03:53 +08:00
< b > Signature< / b >
```typescript
export interface DataQuery
```
< b > Import< / b >
```typescript
import { DataQuery } from '@grafana/data';
```
< b > Properties< / b >
| Property | Type | Description |
| --- | --- | --- |
| [datasource ](#datasource-property ) | < code > string | null</ code > | For mixed data sources the selected datasource is on the query level. For non mixed scenarios this is undefined. |
2020-04-21 16:41:50 +08:00
| [hide ](#hide-property ) | < code > boolean</ code > | true if query is disabled (ie should not be returned to the dashboard) |
2020-02-26 17:03:53 +08:00
| [key ](#key-property ) | < code > string</ code > | Unique, guid like, string used in explore mode |
2020-04-21 16:41:50 +08:00
| [queryType ](#querytype-property ) | < code > string</ code > | Specify the query flavor |
2020-02-26 17:03:53 +08:00
| [refId ](#refid-property ) | < code > string</ code > | A - Z |
### datasource property
For mixed data sources the selected datasource is on the query level. For non mixed scenarios this is undefined.
< b > Signature< / b >
```typescript
datasource?: string | null;
```
### hide property
2020-04-21 16:41:50 +08:00
true if query is disabled (ie should not be returned to the dashboard)
2020-02-26 17:03:53 +08:00
< b > Signature< / b >
```typescript
hide?: boolean;
```
### key property
Unique, guid like, string used in explore mode
< b > Signature< / b >
```typescript
key?: string;
```
2020-04-21 16:41:50 +08:00
### queryType property
2020-02-26 17:03:53 +08:00
2020-04-21 16:41:50 +08:00
Specify the query flavor
2020-02-26 17:03:53 +08:00
< b > Signature< / b >
```typescript
2020-04-21 16:41:50 +08:00
queryType?: string;
2020-02-26 17:03:53 +08:00
```
### refId property
A - Z
< b > Signature< / b >
```typescript
refId: string;
```