Stability Level Preview
API Stability Preview

The alertFieldValues() GraphQL query will return a list of all actions, labels and packages used in an alert. This query field is a preview and subject to changes.

Syntax

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

graphql
alertFieldValues(
     input: AlertFieldValuesInput!
   ): AlertFieldValues!

For the input, there's only one required parameter. It has a special datatype, which is described the next section. The return datatype, alertFieldValues is described in the Results Datatypes section. Below is an example using this query field:

Show:
graphql
query {
	alertFieldValues(input:{viewName: "testeroo"} )
  {actionNames, labels}
}
Example Responses
Show:
json
{
  "data": {
    "alertFieldValues": {
      "actionNames": [
        "email-admin"
      ],
      "labels": [
        "late"
      ]
    }
  }
}

Notice that for the AlertFieldValuesInput input, it requires putting the parameter viewName and the name of the repository in curly-brackets. For alertFieldValues, a simple list of fields requested is all that's needed.

Given Datatype

For AlertFieldValuesInput, there is only one parameter. It's described in this table:

Table: AlertFieldValuesInput

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: Sep 17, 2024
viewNameRepoOrViewNameyes PreviewThe name of view for the alerts. RepoOrViewName is a scalar.

Returned Datatype

For alertFieldValues, there are a few parameters. They're listed here along with descriptions of each:

Table: AlertFieldValues

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: Sep 23, 2024
actionNames[string]yes PreviewList of names of actions attached to alerts. Sorted lexicographically by action names.
labels[string]yes PreviewList of labels attached to alerts. Sorted lexicographically by label names.
unversionedPackageSpecifiers[string]yes PreviewA list of packages for installed alerts as non-versioned qualified package specifiers scope/packageName -- sorted lexicographically.