AltairConfig
Constructors
new AltairConfig()
new AltairConfig(
options:object):AltairConfig
Parameters
• options= {}
• options.cspNonce?: string= undefined
CSP nonce value to be used in Altair
• options.disableAccount?: boolean= undefined
Disable the account and remote syncing functionality
• options.endpointURL?: string= undefined
URL to set as the server endpoint
• options.initialAuthorization?: object | object | object | object | object= undefined
Initial authorization type and data
• options.initialEnvironments?= undefined
Initial Environments to be added
Example
{
* activeSubEnvironment: 'sub-1'
* base: {
* title: 'Environment',
* variables: {}
* },
* subEnvironments: [
* {
* title: 'sub-1',
* variables: {}
* }
* ]
* }• options.initialEnvironments.activeSubEnvironment?: string= undefined
• options.initialEnvironments.base?= undefined
• options.initialEnvironments.base.id?: string= undefined
• options.initialEnvironments.base.title?: string= undefined
• options.initialEnvironments.base.variables?: Record<string, unknown>= undefined
• options.initialEnvironments.subEnvironments?: object[]= undefined
• options.initialHeaders?: Record<string, unknown>= undefined
Initial headers object to be added
Example
{
* 'X-GraphQL-Token': 'asd7-237s-2bdk-nsdk4'
* }• options.initialHttpMethod?: "POST" | "GET" | "PUT" | "DELETE"= undefined
Initial HTTP method to use for making requests
• options.initialName?: string= undefined
Initial name of the window
• options.initialPostRequestScript?: string= undefined
Initial post-request script to be added
• options.initialPreRequestScript?: string= undefined
Initial pre-request script to be added
• options.initialQuery?: string= undefined
Initial query to be added
• options.initialRequestHandlerAdditionalParams?: Record<string, unknown>= undefined
Additional params to be passed to the request handler
• options.initialRequestHandlerId?: "http" | "websocket" | "graphql-ws" | "app-sync" | "action-cable" | "graphql-sse"= undefined
Initial request handler id
Default
"http"• options.initialSettings?= undefined
Initial app settings to use
• options.initialSettings.addQueryDepthLimit?: number= undefined
Specifies how deep the 'Add query' functionality should go. You can specify any valid positive integer.
• options.initialSettings.alert.disableUpdateNotification?: boolean= undefined
Disable update notification
• options.initialSettings.alert.disableWarnings?: boolean= undefined
Disable warning alerts
• options.initialSettings.banners.disable?: boolean= undefined
Disable banners
• options.initialSettings.beta.disable.newEditor?: boolean= undefined
Disable new editor beta
• options.initialSettings.beta.disable.newScript?: boolean= undefined
Disable new script beta
• options.initialSettings.disableLineNumbers?: boolean= undefined
Disable line numbers
• options.initialSettings.disablePushNotification?: boolean= undefined
Specifies if native push notifications should be disabled
Default
false• options.initialSettings.doc.hideDeprecatedItems?: boolean= undefined
Hides deprecated Doc items
• options.initialSettings.editor.shortcuts?: Record<string, string>= undefined
Contains shortcut to action mapping
• options.initialSettings.enableExperimental?: boolean= undefined
Enable experimental features. Note: The features might be unstable
Default
false• options.initialSettings.enableTablistScrollbar?: boolean= undefined
Enable the scrollbar in the tab list
• options.initialSettings.historyDepth?: number= undefined
Number of items allowed in history pane
• options.initialSettings.introspection.options.description?: boolean= undefined
Whether to include descriptions in the introspection result
• options.initialSettings.introspection.options.directiveIsRepeatable?: boolean= undefined
Whether to include isRepeatable flag on directives
• options.initialSettings.introspection.options.inputValueDeprecation?: boolean= undefined
Whether target GraphQL server supports deprecation of input values
• options.initialSettings.introspection.options.schemaDescription?: boolean= undefined
Whether to include description field on schema
• options.initialSettings.introspection.options.specifiedByUrl?: boolean= undefined
Whether to include specifiedByUrl in the introspection result
• options.initialSettings.language?: "ach-UG" | "en-US" | "fr-FR" | "es-ES" | "cs-CZ" | "de-DE" | "pt-BR" | "ru-RU" | "uk-UA" | "zh-CN" | "ja-JP" | "sr-SP" | "it-IT" | "pl-PL" | "ko-KR" | "ro-RO" | "vi-VN"= undefined
Specifies the language
• options.initialSettings.plugin.list?: string[]= undefined
Specifies a list of enabled plugins.
Plugins are specified in a string format <plugin-source>:<plugin-name>@<version>::[<opt>]->[<opt-value>]:
<plugin-source>: The source of the plugin. Can be 'npm', 'url' or 'github'<plugin-name>(required): The name of the plugin. Plugin names must begin withaltair-graphql-plugin-<version>: The version of the plugin. If not specified, the latest version will be used[<opt>]->[<opt-value>]: Additional configuration for the plugin. This is used when you specify the source as 'url'. In this case, you can specify the URL where the plugin is hosted.
Example
['altair-graphql-plugin-some-plugin', 'npm:altair-graphql-plugin-some-plugin', 'npm:altair-graphql-plugin-some-plugin@0.3.4', 'url:altair-graphql-plugin-some-plugin@0.3.4::[url]->[http://example.com/some-plugin]']Default
[]• options.initialSettings.request.withCredentials?: boolean= undefined
Send requests with credentials (cookies)
• options.initialSettings.response.hideExtensions?: boolean= undefined
Hides extensions object
• options.initialSettings.response.stream.strategy?: AUTO | CONCATENATE | APPEND | PATCH= undefined
Determine the handling strategy for multiple responses
• options.initialSettings.schema.reload.onEnvChange?: boolean= undefined
Reload schema when switching environments
• options.initialSettings.schema.reloadOnStart?: boolean= undefined
Reload schema on app start
• options.initialSettings.script.allowedCookies?: string[]= undefined
List of cookies to be accessible in the pre-request script
Example
['cookie1', 'cookie2']Default
[]• options.initialSettings.script.allowedLocalStorageKeys?: string[]= undefined
List of local storage keys to be accessible in the pre-request script. These will be made available read-only via the storage API in the script context.
Example
['key1', 'key2']Default
[]• options.initialSettings.tabSize?: number= undefined
Specifies the tab size for the editor
• options.initialSettings.theme?: string= undefined
Specifies the theme. Themes available by default are 'light', 'dark', 'system', 'dracula'. Additional themes can be added via plugins.
Default
'system'• options.initialSettings.theme.dark?: string= undefined
Specifies the theme for dark mode
• options.initialSettings.theme.editorFontFamily?: string= undefined
Specifies the font family for the editors. Any valid CSS font family combination can be used here
• options.initialSettings.theme.editorFontSize?: number= undefined
Specifies the font size for the editors
• options.initialSettings.theme.fontsize?: number= undefined
Specifies the base font size
Default
24• options.initialSettings.themeConfig?: object | object= undefined
Specify custom theme config to override the specified theme values
• options.initialSettings.themeConfig.dark?: object | object= undefined
Theme config object for dark mode
• options.initialSubscriptionRequestHandlerId?: "http" | "websocket" | "graphql-ws" | "app-sync" | "action-cable" | "graphql-sse"= undefined
Initial subscriptions provider
Default
"websocket"• options.initialSubscriptionsPayload?: Record<string, unknown>= undefined
Initial subscriptions connection params
• options.initialVariables?: string= undefined
Initial variables to be added
• options.initialWindows?: object[]= undefined
List of options for windows to be loaded
• options.instanceStorageNamespace?: string= undefined
Namespace for storing the data for the altair instance. Use this when you have multiple altair instances running on the same domain.
Example
instanceStorageNamespace: 'altair_dev_'• options.persistedSettings?= undefined
Persisted settings for the app. The settings will be merged with the app settings.
• options.persistedSettings.addQueryDepthLimit?: number= undefined
Specifies how deep the 'Add query' functionality should go. You can specify any valid positive integer.
• options.persistedSettings.alert.disableUpdateNotification?: boolean= undefined
Disable update notification
• options.persistedSettings.alert.disableWarnings?: boolean= undefined
Disable warning alerts
• options.persistedSettings.banners.disable?: boolean= undefined
Disable banners
• options.persistedSettings.beta.disable.newEditor?: boolean= undefined
Disable new editor beta
• options.persistedSettings.beta.disable.newScript?: boolean= undefined
Disable new script beta
• options.persistedSettings.disableLineNumbers?: boolean= undefined
Disable line numbers
• options.persistedSettings.disablePushNotification?: boolean= undefined
Specifies if native push notifications should be disabled
Default
false• options.persistedSettings.doc.hideDeprecatedItems?: boolean= undefined
Hides deprecated Doc items
• options.persistedSettings.editor.shortcuts?: Record<string, string>= undefined
Contains shortcut to action mapping
• options.persistedSettings.enableExperimental?: boolean= undefined
Enable experimental features. Note: The features might be unstable
Default
false• options.persistedSettings.enableTablistScrollbar?: boolean= undefined
Enable the scrollbar in the tab list
• options.persistedSettings.historyDepth?: number= undefined
Number of items allowed in history pane
• options.persistedSettings.introspection.options.description?: boolean= undefined
Whether to include descriptions in the introspection result
• options.persistedSettings.introspection.options.directiveIsRepeatable?: boolean= undefined
Whether to include isRepeatable flag on directives
• options.persistedSettings.introspection.options.inputValueDeprecation?: boolean= undefined
Whether target GraphQL server supports deprecation of input values
• options.persistedSettings.introspection.options.schemaDescription?: boolean= undefined
Whether to include description field on schema
• options.persistedSettings.introspection.options.specifiedByUrl?: boolean= undefined
Whether to include specifiedByUrl in the introspection result
• options.persistedSettings.language?: "ach-UG" | "en-US" | "fr-FR" | "es-ES" | "cs-CZ" | "de-DE" | "pt-BR" | "ru-RU" | "uk-UA" | "zh-CN" | "ja-JP" | "sr-SP" | "it-IT" | "pl-PL" | "ko-KR" | "ro-RO" | "vi-VN"= undefined
Specifies the language
• options.persistedSettings.plugin.list?: string[]= undefined
Specifies a list of enabled plugins.
Plugins are specified in a string format <plugin-source>:<plugin-name>@<version>::[<opt>]->[<opt-value>]:
<plugin-source>: The source of the plugin. Can be 'npm', 'url' or 'github'<plugin-name>(required): The name of the plugin. Plugin names must begin withaltair-graphql-plugin-<version>: The version of the plugin. If not specified, the latest version will be used[<opt>]->[<opt-value>]: Additional configuration for the plugin. This is used when you specify the source as 'url'. In this case, you can specify the URL where the plugin is hosted.
Example
['altair-graphql-plugin-some-plugin', 'npm:altair-graphql-plugin-some-plugin', 'npm:altair-graphql-plugin-some-plugin@0.3.4', 'url:altair-graphql-plugin-some-plugin@0.3.4::[url]->[http://example.com/some-plugin]']Default
[]• options.persistedSettings.request.withCredentials?: boolean= undefined
Send requests with credentials (cookies)
• options.persistedSettings.response.hideExtensions?: boolean= undefined
Hides extensions object
• options.persistedSettings.response.stream.strategy?: AUTO | CONCATENATE | APPEND | PATCH= undefined
Determine the handling strategy for multiple responses
• options.persistedSettings.schema.reload.onEnvChange?: boolean= undefined
Reload schema when switching environments
• options.persistedSettings.schema.reloadOnStart?: boolean= undefined
Reload schema on app start
• options.persistedSettings.script.allowedCookies?: string[]= undefined
List of cookies to be accessible in the pre-request script
Example
['cookie1', 'cookie2']Default
[]• options.persistedSettings.script.allowedLocalStorageKeys?: string[]= undefined
List of local storage keys to be accessible in the pre-request script. These will be made available read-only via the storage API in the script context.
Example
['key1', 'key2']Default
[]• options.persistedSettings.tabSize?: number= undefined
Specifies the tab size for the editor
• options.persistedSettings.theme?: string= undefined
Specifies the theme. Themes available by default are 'light', 'dark', 'system', 'dracula'. Additional themes can be added via plugins.
Default
'system'• options.persistedSettings.theme.dark?: string= undefined
Specifies the theme for dark mode
• options.persistedSettings.theme.editorFontFamily?: string= undefined
Specifies the font family for the editors. Any valid CSS font family combination can be used here
• options.persistedSettings.theme.editorFontSize?: number= undefined
Specifies the font size for the editors
• options.persistedSettings.theme.fontsize?: number= undefined
Specifies the base font size
Default
24• options.persistedSettings.themeConfig?: object | object= undefined
Specify custom theme config to override the specified theme values
• options.persistedSettings.themeConfig.dark?: object | object= undefined
Theme config object for dark mode
• options.preserveState?: boolean= undefined
Indicates if the state should be preserved for subsequent app loads
Default
true• options.subscriptionsEndpoint?: string= undefined
URL to set as the subscription endpoint. This can be relative or absolute.
• options.subscriptionsProtocol?: string= undefined
URL protocol for the subscription endpoint. This is used if the specified subscriptions endpoint is relative. e.g. wss
Returns
Properties
add_query_depth_limit
add_query_depth_limit:
3=DEFAULT_OPTIONS.ADD_QUERY_DEPTH_LIMIT
cspNonce
cspNonce:
string=''
defaultTheme
defaultTheme:
"system"=DEFAULT_OPTIONS.DEFAULT_THEME
default_language
default_language:
"ach-UG"|"en-US"
disableLineNumbers
disableLineNumbers:
boolean=false
donation
donation:
object
action_count_threshold
action_count_threshold:
number=50
url
url:
string='https://opencollective.com/altair/donate'
ga
ga:
string='UA-41432833-6'
isTranslateMode
isTranslateMode:
any
isWebApp
isWebApp:
any
max_windows
max_windows:
number
options
options:
object
cspNonce
cspNonce:
string=''
CSP nonce value to be used in Altair
disableAccount
disableAccount:
boolean=false
Disable the account and remote syncing functionality
endpointURL?
optionalendpointURL:string
URL to set as the server endpoint
initialAuthorization?
optionalinitialAuthorization:object|object|object|object|object
Initial authorization type and data
initialEnvironments?
optionalinitialEnvironments:object
Initial Environments to be added
Example
{
* activeSubEnvironment: 'sub-1'
* base: {
* title: 'Environment',
* variables: {}
* },
* subEnvironments: [
* {
* title: 'sub-1',
* variables: {}
* }
* ]
* }initialEnvironments.activeSubEnvironment?
optionalactiveSubEnvironment:string
initialEnvironments.base?
optionalbase:object
initialEnvironments.base.id?
optionalid:string
initialEnvironments.base.title?
optionaltitle:string
initialEnvironments.base.variables?
optionalvariables:Record<string,unknown>
initialEnvironments.subEnvironments?
optionalsubEnvironments:object[]
initialHeaders?
optionalinitialHeaders:Record<string,unknown>
Initial headers object to be added
Example
{
* 'X-GraphQL-Token': 'asd7-237s-2bdk-nsdk4'
* }initialHttpMethod
initialHttpMethod:
"POST"|"GET"|"PUT"|"DELETE"=httpVerbSchema.enum.POST
Initial HTTP method to use for making requests
initialName?
optionalinitialName:string
Initial name of the window
initialPostRequestScript
initialPostRequestScript:
string=''
Initial post-request script to be added
initialPreRequestScript?
optionalinitialPreRequestScript:string
Initial pre-request script to be added
initialQuery?
optionalinitialQuery:string
Initial query to be added
initialRequestHandlerAdditionalParams
initialRequestHandlerAdditionalParams:
object={}
Additional params to be passed to the request handler
initialRequestHandlerId
initialRequestHandlerId:
"http"|"websocket"|"graphql-ws"|"app-sync"|"action-cable"|"graphql-sse"=HTTP_HANDLER_ID
Initial request handler id
Default
"http"initialSettings?
optionalinitialSettings:object
Initial app settings to use
initialSettings.addQueryDepthLimit?
optionaladdQueryDepthLimit:number
Specifies how deep the 'Add query' functionality should go. You can specify any valid positive integer.
initialSettings.alert.disableUpdateNotification?
optionalinitialSettings.alert.disableUpdateNotification:boolean
Disable update notification
initialSettings.alert.disableWarnings?
optionalinitialSettings.alert.disableWarnings:boolean
Disable warning alerts
initialSettings.banners.disable?
optionalinitialSettings.banners.disable:boolean
Disable banners
initialSettings.beta.disable.newEditor?
optionalinitialSettings.beta.disable.newEditor:boolean
Disable new editor beta
initialSettings.beta.disable.newScript?
optionalinitialSettings.beta.disable.newScript:boolean
Disable new script beta
initialSettings.disableLineNumbers?
optionaldisableLineNumbers:boolean
Disable line numbers
initialSettings.disablePushNotification?
optionaldisablePushNotification:boolean
Specifies if native push notifications should be disabled
Default
falseinitialSettings.doc.hideDeprecatedItems?
optionalinitialSettings.doc.hideDeprecatedItems:boolean
Hides deprecated Doc items
initialSettings.editor.shortcuts?
optionalinitialSettings.editor.shortcuts:Record<string,string>
Contains shortcut to action mapping
initialSettings.enableExperimental?
optionalenableExperimental:boolean
Enable experimental features. Note: The features might be unstable
Default
falseinitialSettings.enableTablistScrollbar?
optionalenableTablistScrollbar:boolean
Enable the scrollbar in the tab list
initialSettings.historyDepth?
optionalhistoryDepth:number
Number of items allowed in history pane
initialSettings.introspection.options.description?
optionalinitialSettings.introspection.options.description:boolean
Whether to include descriptions in the introspection result
initialSettings.introspection.options.directiveIsRepeatable?
optionalinitialSettings.introspection.options.directiveIsRepeatable:boolean
Whether to include isRepeatable flag on directives
initialSettings.introspection.options.inputValueDeprecation?
optionalinitialSettings.introspection.options.inputValueDeprecation:boolean
Whether target GraphQL server supports deprecation of input values
initialSettings.introspection.options.schemaDescription?
optionalinitialSettings.introspection.options.schemaDescription:boolean
Whether to include description field on schema
initialSettings.introspection.options.specifiedByUrl?
optionalinitialSettings.introspection.options.specifiedByUrl:boolean
Whether to include specifiedByUrl in the introspection result
initialSettings.language?
optionallanguage:"ach-UG"|"en-US"|"fr-FR"|"es-ES"|"cs-CZ"|"de-DE"|"pt-BR"|"ru-RU"|"uk-UA"|"zh-CN"|"ja-JP"|"sr-SP"|"it-IT"|"pl-PL"|"ko-KR"|"ro-RO"|"vi-VN"
Specifies the language
initialSettings.plugin.list?
optionalinitialSettings.plugin.list:string[]
Specifies a list of enabled plugins.
Plugins are specified in a string format <plugin-source>:<plugin-name>@<version>::[<opt>]->[<opt-value>]:
<plugin-source>: The source of the plugin. Can be 'npm', 'url' or 'github'<plugin-name>(required): The name of the plugin. Plugin names must begin withaltair-graphql-plugin-<version>: The version of the plugin. If not specified, the latest version will be used[<opt>]->[<opt-value>]: Additional configuration for the plugin. This is used when you specify the source as 'url'. In this case, you can specify the URL where the plugin is hosted.
Example
['altair-graphql-plugin-some-plugin', 'npm:altair-graphql-plugin-some-plugin', 'npm:altair-graphql-plugin-some-plugin@0.3.4', 'url:altair-graphql-plugin-some-plugin@0.3.4::[url]->[http://example.com/some-plugin]']Default
[]initialSettings.request.withCredentials?
optionalinitialSettings.request.withCredentials:boolean
Send requests with credentials (cookies)
initialSettings.response.hideExtensions?
optionalinitialSettings.response.hideExtensions:boolean
Hides extensions object
initialSettings.response.stream.strategy?
optionalinitialSettings.response.stream.strategy:AUTO|CONCATENATE|APPEND|PATCH
Determine the handling strategy for multiple responses
initialSettings.schema.reload.onEnvChange?
optionalinitialSettings.schema.reload.onEnvChange:boolean
Reload schema when switching environments
initialSettings.schema.reloadOnStart?
optionalinitialSettings.schema.reloadOnStart:boolean
Reload schema on app start
initialSettings.script.allowedCookies?
optionalinitialSettings.script.allowedCookies:string[]
List of cookies to be accessible in the pre-request script
Example
['cookie1', 'cookie2']Default
[]initialSettings.script.allowedLocalStorageKeys?
optionalinitialSettings.script.allowedLocalStorageKeys:string[]
List of local storage keys to be accessible in the pre-request script. These will be made available read-only via the storage API in the script context.
Example
['key1', 'key2']Default
[]initialSettings.tabSize?
optionaltabSize:number
Specifies the tab size for the editor
initialSettings.theme?
optionaltheme:string
Specifies the theme. Themes available by default are 'light', 'dark', 'system', 'dracula'. Additional themes can be added via plugins.
Default
'system'initialSettings.theme.dark?
optionalinitialSettings.theme.dark:string
Specifies the theme for dark mode
initialSettings.theme.editorFontFamily?
optionalinitialSettings.theme.editorFontFamily:string
Specifies the font family for the editors. Any valid CSS font family combination can be used here
initialSettings.theme.editorFontSize?
optionalinitialSettings.theme.editorFontSize:number
Specifies the font size for the editors
initialSettings.theme.fontsize?
optionalinitialSettings.theme.fontsize:number
Specifies the base font size
Default
24initialSettings.themeConfig?
optionalthemeConfig:object|object
Specify custom theme config to override the specified theme values
initialSettings.themeConfig.dark?
optionalinitialSettings.themeConfig.dark:object|object
Theme config object for dark mode
initialSubscriptionRequestHandlerId
initialSubscriptionRequestHandlerId:
"http"|"websocket"|"graphql-ws"|"app-sync"|"action-cable"|"graphql-sse"=WEBSOCKET_HANDLER_ID
Initial subscriptions provider
Default
"websocket"initialSubscriptionsPayload?
optionalinitialSubscriptionsPayload:Record<string,unknown>
Initial subscriptions connection params
initialVariables?
optionalinitialVariables:string
Initial variables to be added
initialWindows
initialWindows:
object[] =[]
List of options for windows to be loaded
instanceStorageNamespace
instanceStorageNamespace:
string='altair_'
Namespace for storing the data for the altair instance. Use this when you have multiple altair instances running on the same domain.
Example
instanceStorageNamespace: 'altair_dev_'persistedSettings?
optionalpersistedSettings:object
Persisted settings for the app. The settings will be merged with the app settings.
persistedSettings.addQueryDepthLimit?
optionaladdQueryDepthLimit:number
Specifies how deep the 'Add query' functionality should go. You can specify any valid positive integer.
persistedSettings.alert.disableUpdateNotification?
optionalpersistedSettings.alert.disableUpdateNotification:boolean
Disable update notification
persistedSettings.alert.disableWarnings?
optionalpersistedSettings.alert.disableWarnings:boolean
Disable warning alerts
persistedSettings.banners.disable?
optionalpersistedSettings.banners.disable:boolean
Disable banners
persistedSettings.beta.disable.newEditor?
optionalpersistedSettings.beta.disable.newEditor:boolean
Disable new editor beta
persistedSettings.beta.disable.newScript?
optionalpersistedSettings.beta.disable.newScript:boolean
Disable new script beta
persistedSettings.disableLineNumbers?
optionaldisableLineNumbers:boolean
Disable line numbers
persistedSettings.disablePushNotification?
optionaldisablePushNotification:boolean
Specifies if native push notifications should be disabled
Default
falsepersistedSettings.doc.hideDeprecatedItems?
optionalpersistedSettings.doc.hideDeprecatedItems:boolean
Hides deprecated Doc items
persistedSettings.editor.shortcuts?
optionalpersistedSettings.editor.shortcuts:Record<string,string>
Contains shortcut to action mapping
persistedSettings.enableExperimental?
optionalenableExperimental:boolean
Enable experimental features. Note: The features might be unstable
Default
falsepersistedSettings.enableTablistScrollbar?
optionalenableTablistScrollbar:boolean
Enable the scrollbar in the tab list
persistedSettings.historyDepth?
optionalhistoryDepth:number
Number of items allowed in history pane
persistedSettings.introspection.options.description?
optionalpersistedSettings.introspection.options.description:boolean
Whether to include descriptions in the introspection result
persistedSettings.introspection.options.directiveIsRepeatable?
optionalpersistedSettings.introspection.options.directiveIsRepeatable:boolean
Whether to include isRepeatable flag on directives
persistedSettings.introspection.options.inputValueDeprecation?
optionalpersistedSettings.introspection.options.inputValueDeprecation:boolean
Whether target GraphQL server supports deprecation of input values
persistedSettings.introspection.options.schemaDescription?
optionalpersistedSettings.introspection.options.schemaDescription:boolean
Whether to include description field on schema
persistedSettings.introspection.options.specifiedByUrl?
optionalpersistedSettings.introspection.options.specifiedByUrl:boolean
Whether to include specifiedByUrl in the introspection result
persistedSettings.language?
optionallanguage:"ach-UG"|"en-US"|"fr-FR"|"es-ES"|"cs-CZ"|"de-DE"|"pt-BR"|"ru-RU"|"uk-UA"|"zh-CN"|"ja-JP"|"sr-SP"|"it-IT"|"pl-PL"|"ko-KR"|"ro-RO"|"vi-VN"
Specifies the language
persistedSettings.plugin.list?
optionalpersistedSettings.plugin.list:string[]
Specifies a list of enabled plugins.
Plugins are specified in a string format <plugin-source>:<plugin-name>@<version>::[<opt>]->[<opt-value>]:
<plugin-source>: The source of the plugin. Can be 'npm', 'url' or 'github'<plugin-name>(required): The name of the plugin. Plugin names must begin withaltair-graphql-plugin-<version>: The version of the plugin. If not specified, the latest version will be used[<opt>]->[<opt-value>]: Additional configuration for the plugin. This is used when you specify the source as 'url'. In this case, you can specify the URL where the plugin is hosted.
Example
['altair-graphql-plugin-some-plugin', 'npm:altair-graphql-plugin-some-plugin', 'npm:altair-graphql-plugin-some-plugin@0.3.4', 'url:altair-graphql-plugin-some-plugin@0.3.4::[url]->[http://example.com/some-plugin]']Default
[]persistedSettings.request.withCredentials?
optionalpersistedSettings.request.withCredentials:boolean
Send requests with credentials (cookies)
persistedSettings.response.hideExtensions?
optionalpersistedSettings.response.hideExtensions:boolean
Hides extensions object
persistedSettings.response.stream.strategy?
optionalpersistedSettings.response.stream.strategy:AUTO|CONCATENATE|APPEND|PATCH
Determine the handling strategy for multiple responses
persistedSettings.schema.reload.onEnvChange?
optionalpersistedSettings.schema.reload.onEnvChange:boolean
Reload schema when switching environments
persistedSettings.schema.reloadOnStart?
optionalpersistedSettings.schema.reloadOnStart:boolean
Reload schema on app start
persistedSettings.script.allowedCookies?
optionalpersistedSettings.script.allowedCookies:string[]
List of cookies to be accessible in the pre-request script
Example
['cookie1', 'cookie2']Default
[]persistedSettings.script.allowedLocalStorageKeys?
optionalpersistedSettings.script.allowedLocalStorageKeys:string[]
List of local storage keys to be accessible in the pre-request script. These will be made available read-only via the storage API in the script context.
Example
['key1', 'key2']Default
[]persistedSettings.tabSize?
optionaltabSize:number
Specifies the tab size for the editor
persistedSettings.theme?
optionaltheme:string
Specifies the theme. Themes available by default are 'light', 'dark', 'system', 'dracula'. Additional themes can be added via plugins.
Default
'system'persistedSettings.theme.dark?
optionalpersistedSettings.theme.dark:string
Specifies the theme for dark mode
persistedSettings.theme.editorFontFamily?
optionalpersistedSettings.theme.editorFontFamily:string
Specifies the font family for the editors. Any valid CSS font family combination can be used here
persistedSettings.theme.editorFontSize?
optionalpersistedSettings.theme.editorFontSize:number
Specifies the font size for the editors
persistedSettings.theme.fontsize?
optionalpersistedSettings.theme.fontsize:number
Specifies the base font size
Default
24persistedSettings.themeConfig?
optionalthemeConfig:object|object
Specify custom theme config to override the specified theme values
persistedSettings.themeConfig.dark?
optionalpersistedSettings.themeConfig.dark:object|object
Theme config object for dark mode
preserveState
preserveState:
boolean=true
Indicates if the state should be preserved for subsequent app loads
Default
truesubscriptionsEndpoint?
optionalsubscriptionsEndpoint:string
URL to set as the subscription endpoint. This can be relative or absolute.
subscriptionsProtocol?
optionalsubscriptionsProtocol:string
URL protocol for the subscription endpoint. This is used if the specified subscriptions endpoint is relative. e.g. wss
query_history_depth
query_history_depth:
number
tab_size
tab_size:
2=DEFAULT_OPTIONS.TAB_SIZE
themes
themes: readonly [
"light","dark","dracula","system"] =DEFAULT_OPTIONS.THEMES
Methods
getUrl()
getUrl(
name: keyofUrlConfig,environment:ConfigEnvironment):Promise<string>
Parameters
• name: keyof UrlConfig
• environment: ConfigEnvironment= 'production'
Returns
Promise<string>
getUrlConfig()
getUrlConfig(
environment:ConfigEnvironment):UrlConfig
Parameters
• environment: ConfigEnvironment= 'production'
Returns
getUrlConfigWithLocal()
getUrlConfigWithLocal(
environment:ConfigEnvironment):Promise<UrlConfig>
Parameters
• environment: ConfigEnvironment= 'production'
Returns
Promise<UrlConfig>
Altair GraphQL Client