Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EditorActions

Hierarchy

  • EditorActions

Index

Properties

copyQuery

copyQuery: () => Promise<void>

Copy a query to clipboard.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

mergeQuery

mergeQuery: () => void

Merge fragments definitions into operation definition.

Type declaration

    • (): void
    • Returns void

prettifyEditors

prettifyEditors: () => Promise<void>

Prettify query, variables and request headers editors.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

Methods

addTab

  • addTab(): void

changeTab

  • changeTab(index: number): void

closeTab

  • closeTab(index: number): void
  • Close a tab. If the currently active tab is closed, the tab before it will become active. If there is no tab before the closed one, the tab after it will become active.

    Parameters

    • index: number

      The index of the tab that should be closed.

    Returns void

moveTab

setEditor

  • setEditor(state: Pick<EditorSlice, "headerEditor" | "queryEditor" | "responseEditor" | "variableEditor">): void

setOperationFacts

  • setOperationFacts(facts: { documentAST?: DocumentNode; operationName?: undefined | string; operations?: OperationDefinitionNode[] }): void
  • Parameters

    • facts: { documentAST?: DocumentNode; operationName?: undefined | string; operations?: OperationDefinitionNode[] }
      • Optional documentAST?: DocumentNode
      • Optional operationName?: undefined | string
      • Optional operations?: OperationDefinitionNode[]

    Returns void

setOperationName

  • setOperationName(operationName: string): void

setShouldPersistHeaders

  • setShouldPersistHeaders(persist: boolean): void

storeTabs

updateActiveTabValues

  • updateActiveTabValues(partialTab: Partial<Omit<TabState, "id" | "hash" | "title">>): void
  • Update the state for the tab that is currently active. This will be reflected in the tabs object and the state will be persisted in storage (if available).

    Parameters

    • partialTab: Partial<Omit<TabState, "id" | "hash" | "title">>

      A partial tab state object that will override the current values. The properties id, hash and title cannot be changed.

    Returns void

Generated using TypeDoc