API Stability Short-Term

The concatenateQueries() GraphQL query is used to concatenate multiple valid queries into a combined query.

Syntax

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

graphql
concatenateQueries(
     input: ConcatenateQueriesArguments!
   ): QueryConcatenationInfo!

For the input, there is a special datatype, ConcatenateQueriesArguments. It's described in the next section. The return datatype, QueryConcatenationInfo is described in the subsequent section. Here's an example of this query:

Show:
graphql
query {
	concatenateQueries(input:
    {queryStrings: ["actor.type=*", "groupBy([#type,actor.type])"],
     version:{name: "legacy"}
    }
  )
  {concatenatedQuery, 
   validationResult{isValid,diagnostics{message,code,severity}}
  }
}
Example Responses
Show:
json
{
  "data": {
    "concatenateQueries": {
      "concatenatedQuery": "actor.type=*\n| groupBy([#type,actor.type])",
      "validationResult": {
        "isValid": true,
        "diagnostics": []
      }
    }
  }
}

For the input, the arguments given are within curly-brackets. The values for queryStrings is given in square-brackets because it's an array. Incidentally, you can give more than two query strings.

As for the returned results in the example, they're given in a comma-separated list, with one of them with curly-brackets for it's sub-selections.

Given Datatypes

For the given datatype, ConcatenateQueriesArguments, there are a two parameters. Below is a list of them along with a description of each:

Table: ConcatenateQueriesArguments

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
querystrings[string]yes Short-TermThe query strings.
versionLanguageVersionInputTypeyes Short-TermThe language version used. See LanguageVersionInputType.

Returned Datatypes

For QueryConcatenationInfo, there are a couple possible values returned, which are listed below. One, though, has a few sub-choices of returned values — as shown in the example above. So be sure to click on the link to its table of parameters.

Table: QueryConcatenationInfo

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: Oct 2, 2024
concatenatedQuerystringyes Short-TermThe result of concatenating the queries.
validationResultQueryValidationInfoyes Short-TermThe validation results. See QueryValidationInfo.