Usage
import { NrqlQuery } from 'nr1'
Examples
Props
Due November 1st, 2022
The "accountId" prop is deprecated, use "accountIds" prop instead.
Identifier of the account to execute the NRQL query against.
Identifiers of accounts to execute the NRQL query against.
Render prop function as a child.
function (queryResult: QueryResult Results of the
query.
) => React.ReactNode
NrqlQuery .FORMAT_TYPE .CHART
Format of the response.
<One ofNrqlQuery.FORMAT_TYPE.CHART,NrqlQuery.FORMAT_TYPE.RAW,>
Offset to apply to the computed begin_time and end_time, in epoch milliseconds. This offset is only applied when the query is open ended, that is:
- end_time is not specified, and
- duration is specified.
If these conditions are met and an offset value is present, the effective end_time will be set to offset milliseconds ending now, while the effective begin_time will be set to (offset + duration) milliseconds before that end_time.
Interval in millisecond to poll for new data or automatically set based on response data's metadata.
NRQL query.
false
When set to true
, the query will be skipped entirely from
rendering.
Time range to scope NRQL query time range. When only duration is provided it uses duration to query from NOW back until DURATION (aka Open ended query). When begin_time and end_time are provided it uses them to query SINCE begin_time UNTIL end_time (aka Closed query).
shape
Methods
NrqlQuery.query
function (props: Object Object containing the query options. Any
NrqlQuery
prop is a valid option except children
and
pollInterval
.
) => PromiseQueryResult
Type definitions
PromiseQueryResult
{error: ApolloClient.ApolloError, Runtime error with graphQLErrors
and networkError
properties.
data: Object, Object containing the result of your query.
fetchMore: function|null, If not null
, fetchMore
allows you to
load more results for your query. New data is merged with previous
data.
refetch: function, Refetch the query.
}
QueryResult
{loading: boolean, Indicates that the request is in flight.
error: ApolloClient.ApolloError, Runtime error with graphQLErrors
and networkError
properties.
data: Object, Object containing the result of your query.
fetchMore: function|null, If not null
, fetchMore
allows you to
load more results for your query. New data is merged with previous
data.
refetch: function, Refetch the query.
}