API Stability Preview

The featureFlags() GraphQL query is used to list feature flags depending on filters and context. All flags should be considered as beta features. Enabling features that are marked as experimental is strongly discouraged and can lead to LogScale being in a bad state beyond repair.

Syntax

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

graphql
featureFlags(
     includeExperimentalFeatures: boolean, 
     enabledInScopeFilter: EnabledInScope
   ): [FeatureFlagV2!]!

The includeExperimentalFeatures is used to include experimental features. Enabling experimental features can lead to LogScale in a bad state beyond repair.

The example below requests a list of features that have been flagged, including experimental ones. For the return values, it's asking for the name of the flag, whether it's experimental, and a description of it.

Show:
graphql
query {featureFlags(
     includeExperimentalFeatures: true,
     enabledInScopeFilter: Disabled
     )
  {flag, experimental, description}
}
Example Responses
Show:
json
{
  "data": {
    "featureFlags": [
      {
        "flag": "AlternateQueryMergeTargetHandling",
        "experimental": true,
        "description": "Enables alternate query merge target handling"
      },
      {
        "flag": "ArrayFunctions",
        "experimental": true,
        "description": "Enable ArrayFunctions in query language."
      },
      {
        "flag": "CachePolicies",
        "experimental": true,
        "description": "Prioritize newer over older segments."
      },
      {
        "flag": "CustomIngestTokens",
        "experimental": false,
        "description": "Enable custom ingest tokens not generated by LogScale."
      },
      ...
  }
}

The results would normally very lengthy. They've been shortened to save space on this page.

Given Datatypes

The enabledInScopeFilter parameter is used to enable filter defining. With it, you set which scope feature flags should be returned. It uses the EnabledInScope datatype, which has a few parameters that are listed below:

Table: EnabledInScope

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
Disabledboolean  PreviewWhether the feature flag is disabled.
GlobalScopeboolean  PreviewWhether the feature flag is enabled globally.
OrganizationScopeboolean  PreviewWhether the feature flag is enabled for the organization.
UserScopeboolean  PreviewWhether the feature flag is enabled for the user.

Returned Datatypes

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

Table: FeatureFlagV2

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 25, 2024
descriptionstringyes PreviewA description of the feature flag.
experimentalbooleanyes PreviewWhether the feature is experimental.
flagFeatureFlagyes PreviewThe feature flag. See FeatureFlag.