Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GraphiQL

The top-level React component for GraphiQL, intended to encompass the entire browser viewport.

see

https://github.com/graphql/graphiql#usage

Hierarchy

  • any
    • GraphiQL

Index

Constructors

constructor

  • Parameters

    Returns GraphiQL

Properties

_editorQueryID

_editorQueryID: number = 0

_historyStore

_historyStore: Maybe<HistoryStore>

_queryHistory

_queryHistory: Maybe<QueryHistory>

_storage

_storage: StorageAPI

codeMirrorSizer

codeMirrorSizer: CodeMirrorSizer

componentIsMounted

componentIsMounted: boolean

docExplorerComponent

docExplorerComponent: Maybe<DocExplorer>

editorBarComponent

editorBarComponent: Maybe<HTMLDivElement>

graphiqlContainer

graphiqlContainer: Maybe<HTMLDivElement>

handleEditQuery

handleEditQuery: (Anonymous function) = debounce(100, (value: string) => {const queryFacts = this._updateQueryFacts(value,this.state.operationName,this.state.operations,this.state.schema,);this.setState({query: value,...queryFacts,});this._storage.set('query', value);if (this.props.onEditQuery) {return this.props.onEditQuery(value, queryFacts?.documentAST);}})

headerEditorComponent

headerEditorComponent: Maybe<HeaderEditor>

queryEditorComponent

queryEditorComponent: Maybe<QueryEditor>

resultComponent

resultComponent: Maybe<ResultViewer>

resultViewerElement

resultViewerElement: Maybe<HTMLElement>

variableEditorComponent

variableEditorComponent: Maybe<VariableEditor>

Static Button

Button: any = ToolbarButton

Static Footer

Footer: GraphiQLFooter = GraphiQLFooter

Static Group

Group: any = ToolbarGroup

Static HeaderEditor

HeaderEditor: any = HeaderEditor

Static Logo

Logo: GraphiQLLogo = GraphiQLLogo

Static Menu

Menu: any = ToolbarMenu

Static MenuItem

MenuItem: any = ToolbarMenuItem

Static QueryEditor

QueryEditor: any = QueryEditor

Static ResultViewer

ResultViewer: any = ResultViewer

Static Toolbar

Toolbar: GraphiQLToolbar = GraphiQLToolbar

Static ToolbarButton

ToolbarButton: any = ToolbarButton

Static VariableEditor

VariableEditor: any = VariableEditor

Methods

UNSAFE_componentWillMount

  • UNSAFE_componentWillMount(): void
  • Returns void

UNSAFE_componentWillReceiveProps

  • UNSAFE_componentWillReceiveProps(nextProps: GraphiQLProps): void
  • Parameters

    Returns void

autoCompleteLeafs

  • autoCompleteLeafs(): string
  • Inspect the query, automatically filling in selection sets for non-leaf fields which do not yet have them.

    Returns string

componentDidMount

  • componentDidMount(): void
  • Returns void

componentDidUpdate

  • componentDidUpdate(): void
  • Returns void

getHeaderEditor

  • getHeaderEditor(): any
  • Get the header editor CodeMirror instance.

    Returns any

getQueryEditor

  • getQueryEditor(): any
  • Get the query editor CodeMirror instance.

    Returns any

getVariableEditor

  • getVariableEditor(): any
  • Get the variable editor CodeMirror instance.

    Returns any

handleClickReference

  • handleClickReference(reference: GraphQLType): void
  • Parameters

    • reference: GraphQLType

    Returns void

handleCopyQuery

  • handleCopyQuery(): any
  • Returns any

handleEditHeaders

  • handleEditHeaders(value: string): void
  • Parameters

    • value: string

    Returns void

handleEditOperationName

  • handleEditOperationName(operationName: string): void
  • Parameters

    • operationName: string

    Returns void

handleEditVariables

  • handleEditVariables(value: string): void
  • Parameters

    • value: string

    Returns void

handleEditorRunQuery

  • handleEditorRunQuery(): void
  • Returns void

handleHintInformationRender

  • handleHintInformationRender(elem: HTMLDivElement): void
  • Parameters

    • elem: HTMLDivElement

    Returns void

handleMergeQuery

  • handleMergeQuery(): void
  • Returns void

handlePrettifyQuery

  • handlePrettifyQuery(): void
  • Returns void

handleResetResize

  • handleResetResize(): void
  • Returns void

handleRunQuery

  • handleRunQuery(selectedOperationName?: string): Promise<void>
  • Parameters

    • Optional selectedOperationName: string

    Returns Promise<void>

handleSelectHistoryQuery

  • handleSelectHistoryQuery(query?: string, variables?: string, headers?: string, operationName?: string): void
  • Parameters

    • Optional query: string
    • Optional variables: string
    • Optional headers: string
    • Optional operationName: string

    Returns void

handleStopQuery

  • handleStopQuery(): void
  • Returns void

handleToggleDocs

  • handleToggleDocs(): void
  • Returns void

handleToggleHistory

  • handleToggleHistory(): void
  • Returns void

refresh

  • refresh(): void
  • Refresh all CodeMirror instances.

    Returns void

render

  • render(): Element
  • Returns Element

safeSetState

  • safeSetState(nextState: any, callback?: any): void
  • Parameters

    • nextState: any
    • Optional callback: any

    Returns void

Static formatError

  • formatError(rawError: Error): string
  • Parameters

    • rawError: Error

    Returns string

Static formatResult

  • formatResult(result: any): string
  • Static Methods

    Parameters

    • result: any

    Returns string

Generated using TypeDoc