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:
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.
query {featureFlags(
includeExperimentalFeatures: true,
enabledInScopeFilter: Disabled
)
{flag, experimental, description}
}
{
"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
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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 | |||||
Disabled | boolean | Preview | Whether the feature flag is disabled. | ||
GlobalScope | boolean | Preview | Whether the feature flag is enabled globally. | ||
OrganizationScope | boolean | Preview | Whether the feature flag is enabled for the organization. | ||
UserScope | boolean | Preview | Whether 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
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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 | |||||
description | string | yes | Preview | A description of the feature flag. | |
experimental | boolean | yes | Preview | Whether the feature is experimental. | |
flag | FeatureFlag | yes | Preview | The feature flag. See FeatureFlag . |