API Stability Preview

The languageRestrictions() GraphQL query used to get language restrictions for language version. This field is not yet available. It's described here as a preview and is used only for internal testing.

Syntax

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

graphql
languageRestrictions(
     version: LanguageVersionEnum!
   ): QueryLanguageRestriction!

For the LanguageVersionEnum, you'd enter the language version you want to check from the list in the Given Datatype section further down this page. For the return values you'd list the parameters you want like you can see in the example here:

Show:
graphql
query {
  languageRestrictions(version: legacy) 
  {version {
    name
    futureName
  }, enabled, allowedFunctions}
}
Example Responses
Show:
json
{
  "data": {
    "languageRestrictions": {
      "version": {
        "name": "legacy",
        "futureName": null
      },
      "enabled": false,
      "allowedFunctions": []
    }
  }
}

In the results shown here, you can see that enabled returns false, meaning there are no language restrictions for the legacy version.

Given Datatypes

The returned datatype LanguageVersionEnum has a few choices. They're listed below:

Table: LanguageVersionEnum

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 13, 2024
federated1boolean  PreviewIndicates if Federated1 version of the LogScale query is used.
legacyboolean  PreviewWhether legacy LogScale query language is used.
xdr1boolean  PreviewWhether XDR1 is used.
xdrdetects1boolean  PreviewWhether XDR Detects 1 query language is used.

Returned Datatypes

The returned datatype QueryLanguageRestriction has a few parameters. Below is a list of them along with a description of each:

Table: QueryLanguageRestriction

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
allowedFunctions[string]yes PreviewThe list of functions allowed in the language version.
enabledbooleanyes PreviewWhether the query language restriction is enabled.
versionLanguageVersionyes PreviewThe query language version used. See LanguageVersion.