API Stability Preview

The queryAnalysis() GraphQL query to analyze a given query. This is a preview and subject to changes.

Syntax

Below is the syntax for the queryAnalysis() query field:

graphql
queryAnalysis(
      queryString: string!, 
      languageVersion: LanguageVersionEnum!, 
      isLive: boolean!, viewName: string
   ): queryAnalysis!

For the input, the only special datatype is for languageVersion. See the LanguageVersionEnum for a list of choices (e.g.,legacy). For the return parameters, see the Returned Datatype section here. Below is an example of how this query field might be used:

Show:
graphql
query {
  queryAnalysis(
     queryString: "host:localhost", 
     languageVersion: legacy, 
     isLive: true, 
     viewName:"humio")
  {filterPart, isAggregate, isSinglePhase}
}
Example Responses
Show:
json
{
  "data": {
    "queryAnalysis": {
      "filterPart": "host:localhost",
      "isAggregate": false,
      "isSinglePhase": true
    }
  }
}

Returned Datatypes

For queryAnalysis, there are a few parameters. Below is a list of them along with a description of each:

Table: queryAnalysis

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Mar 18, 2025
filterPartstringyes PreviewThe query string up to the first aggregator.
drilldownsdrilldownsyes PreviewThe number associated with the type of page. See drilldowns.
isAggregatebooleanyes PreviewWhether the query contains an aggregator.
isSinglePhasebooleanyes PreviewWhether the query doesn't contain a join-like function.
isValidFilterAlertQuerybooleanyes Preview

Checks if a query is fit for use for a filter alert.

This is deprecated and is no longer used internally. It will be removed in version 1.207. Use instead analyzeQuery, suggestedAlertType.