graphiql

  • Version 1.4.2
  • Published
  • 7.15 MB
  • 8 dependencies
  • MIT license

Install

npm i graphiql
yarn add graphiql
pnpm add graphiql

Overview

An graphical interactive in-browser GraphQL IDE.

Index

Variables

Functions

Classes

Interfaces

Type Aliases

Variables

variable getQueryFacts

const getQueryFacts: (schema?: any, documentStr?: string) => QueryFacts;

    Functions

    function fillLeafs

    fillLeafs: (
    schema?: any,
    docString?: string,
    getDefaultFieldNames?: GetDefaultFieldNamesFn
    ) => { insertions: Insertion[]; result: string | undefined };

      function getSelectedOperationName

      getSelectedOperationName: (
      prevOperations?: OperationDefinitionNode[] | undefined,
      prevSelectedOperationName?: string,
      operations?: OperationDefinitionNode[]
      ) => string | undefined;

        function mergeAst

        mergeAst: (documentAST: any, schema?: any) => any;

          function onHasCompletion

          onHasCompletion: (
          _cm: any,
          data: CM.EditorChangeLinkedList | undefined,
          onHintInformationRender: (el: HTMLDivElement) => void
          ) => void;

            function ToolbarGroup

            ToolbarGroup: ({ children }: ToolbarGroupProps) => any;

              Classes

              class DocExplorer

              class DocExplorer extends React.Component<DocExplorerProps, DocExplorerState> {}

                constructor

                constructor(props: DocExplorerProps);

                  property handleClickField

                  handleClickField: (field: FieldType) => void;

                    property handleClickType

                    handleClickType: (type: any) => void;

                      property handleNavBackClick

                      handleNavBackClick: () => void;

                        property handleSearch

                        handleSearch: (value: string) => void;

                          method render

                          render: () => any;

                            method reset

                            reset: () => void;

                              method shouldComponentUpdate

                              shouldComponentUpdate: (
                              nextProps: DocExplorerProps,
                              nextState: DocExplorerState
                              ) => boolean;

                                method showDoc

                                showDoc: (typeOrField: GraphQLNamedType | FieldType) => void;

                                  method showDocForReference

                                  showDocForReference: (reference: any) => void;

                                    method showSearch

                                    showSearch: (search: string) => void;

                                      class GraphiQL

                                      class GraphiQL extends React.Component<GraphiQLProps, GraphiQLState> {}

                                        constructor

                                        constructor(props: GraphiQLProps);

                                          property Button

                                          static Button: typeof ToolbarButton;

                                            property codeMirrorSizer

                                            codeMirrorSizer: CodeMirrorSizer;

                                              property componentIsMounted

                                              componentIsMounted: boolean;

                                                property docExplorerComponent

                                                docExplorerComponent: DocExplorer;

                                                  property editorBarComponent

                                                  editorBarComponent: HTMLDivElement;

                                                    property Footer

                                                    static Footer: typeof GraphiQLFooter;

                                                      property graphiqlContainer

                                                      graphiqlContainer: HTMLDivElement;

                                                        property Group

                                                        static Group: ({ children }: ToolbarGroupProps) => any;

                                                          property handleClickReference

                                                          handleClickReference: (reference: any) => void;

                                                            property handleCopyQuery

                                                            handleCopyQuery: () => void;

                                                              property handleEditHeaders

                                                              handleEditHeaders: (value: string) => void;

                                                                property handleEditOperationName

                                                                handleEditOperationName: (operationName: string) => void;

                                                                  property handleEditorRunQuery

                                                                  handleEditorRunQuery: () => void;

                                                                    property handleEditQuery

                                                                    handleEditQuery: (this: any, value: string) => void;

                                                                      property handleEditVariables

                                                                      handleEditVariables: (value: string) => void;

                                                                        property handleHintInformationRender

                                                                        handleHintInformationRender: (elem: HTMLDivElement) => void;

                                                                          property handleMergeQuery

                                                                          handleMergeQuery: () => void;

                                                                            property handlePrettifyQuery

                                                                            handlePrettifyQuery: () => void;

                                                                              property handleResetResize

                                                                              handleResetResize: () => void;

                                                                                property handleRunQuery

                                                                                handleRunQuery: (selectedOperationName?: string | undefined) => Promise<void>;

                                                                                  property handleSelectHistoryQuery

                                                                                  handleSelectHistoryQuery: (
                                                                                  query?: string | undefined,
                                                                                  variables?: string | undefined,
                                                                                  headers?: string | undefined,
                                                                                  operationName?: string | undefined
                                                                                  ) => void;

                                                                                    property handleStopQuery

                                                                                    handleStopQuery: () => void;

                                                                                      property handleToggleDocs

                                                                                      handleToggleDocs: () => void;

                                                                                        property handleToggleHistory

                                                                                        handleToggleHistory: () => void;

                                                                                          property HeaderEditor

                                                                                          static HeaderEditor: typeof HeaderEditor;

                                                                                            property headerEditorComponent

                                                                                            headerEditorComponent: HeaderEditor;
                                                                                              static Logo: typeof GraphiQLLogo;

                                                                                                property Menu

                                                                                                static Menu: typeof ToolbarMenu;

                                                                                                  property MenuItem

                                                                                                  static MenuItem: any;

                                                                                                    property QueryEditor

                                                                                                    static QueryEditor: typeof QueryEditor;

                                                                                                      property queryEditorComponent

                                                                                                      queryEditorComponent: QueryEditor;

                                                                                                        property resultComponent

                                                                                                        resultComponent: ResultViewer;

                                                                                                          property ResultViewer

                                                                                                          static ResultViewer: typeof ResultViewer;

                                                                                                            property resultViewerElement

                                                                                                            resultViewerElement: HTMLElement;

                                                                                                              property safeSetState

                                                                                                              safeSetState: (nextState: any, callback?: any) => void;

                                                                                                                property Toolbar

                                                                                                                static Toolbar: typeof GraphiQLToolbar;

                                                                                                                  property ToolbarButton

                                                                                                                  static ToolbarButton: typeof ToolbarButton;

                                                                                                                    property VariableEditor

                                                                                                                    static VariableEditor: typeof VariableEditor;

                                                                                                                      property variableEditorComponent

                                                                                                                      variableEditorComponent: VariableEditor;

                                                                                                                        method autoCompleteLeafs

                                                                                                                        autoCompleteLeafs: () => string | undefined;

                                                                                                                          method componentDidMount

                                                                                                                          componentDidMount: () => void;

                                                                                                                            method componentDidUpdate

                                                                                                                            componentDidUpdate: () => void;

                                                                                                                              method formatError

                                                                                                                              static formatError: (rawError: Error) => string;

                                                                                                                                method formatResult

                                                                                                                                static formatResult: (result: any) => string;

                                                                                                                                  method getHeaderEditor

                                                                                                                                  getHeaderEditor: () => import('codemirror').Editor | null;

                                                                                                                                    method getQueryEditor

                                                                                                                                    getQueryEditor: () => import('codemirror').Editor | undefined;

                                                                                                                                      method getVariableEditor

                                                                                                                                      getVariableEditor: () => import('codemirror').Editor | null;

                                                                                                                                        method refresh

                                                                                                                                        refresh: () => void;

                                                                                                                                          method render

                                                                                                                                          render: () => any;

                                                                                                                                            method UNSAFE_componentWillMount

                                                                                                                                            UNSAFE_componentWillMount: () => void;

                                                                                                                                              method UNSAFE_componentWillReceiveProps

                                                                                                                                              UNSAFE_componentWillReceiveProps: (nextProps: GraphiQLProps) => void;

                                                                                                                                                class QueryEditor

                                                                                                                                                class QueryEditor
                                                                                                                                                extends React.Component<QueryEditorProps, {}>
                                                                                                                                                implements SizerComponent {}

                                                                                                                                                  constructor

                                                                                                                                                  constructor(props: QueryEditorProps);

                                                                                                                                                    property cachedValue

                                                                                                                                                    cachedValue: string;

                                                                                                                                                      property editor

                                                                                                                                                      editor: any;

                                                                                                                                                        property ignoreChangeEvent

                                                                                                                                                        ignoreChangeEvent: boolean;

                                                                                                                                                          method componentDidMount

                                                                                                                                                          componentDidMount: () => void;

                                                                                                                                                            method componentDidUpdate

                                                                                                                                                            componentDidUpdate: (prevProps: QueryEditorProps) => void;

                                                                                                                                                              method componentWillUnmount

                                                                                                                                                              componentWillUnmount: () => void;

                                                                                                                                                                method getClientHeight

                                                                                                                                                                getClientHeight: () => number | null;

                                                                                                                                                                  method getCodeMirror

                                                                                                                                                                  getCodeMirror: () => any;

                                                                                                                                                                    method render

                                                                                                                                                                    render: () => any;

                                                                                                                                                                      class ToolbarButton

                                                                                                                                                                      class ToolbarButton extends React.Component<
                                                                                                                                                                      ToolbarButtonProps,
                                                                                                                                                                      ToolbarButtonState
                                                                                                                                                                      > {}

                                                                                                                                                                        constructor

                                                                                                                                                                        constructor(props: ToolbarButtonProps);

                                                                                                                                                                          property handleClick

                                                                                                                                                                          handleClick: () => void;

                                                                                                                                                                            method render

                                                                                                                                                                            render: () => any;

                                                                                                                                                                              class ToolbarMenu

                                                                                                                                                                              class ToolbarMenu extends React.Component<ToolbarMenuProps, ToolbarMenuState> {}

                                                                                                                                                                                constructor

                                                                                                                                                                                constructor(props: ToolbarMenuProps);

                                                                                                                                                                                  property handleOpen

                                                                                                                                                                                  handleOpen: any;

                                                                                                                                                                                    method componentWillUnmount

                                                                                                                                                                                    componentWillUnmount: () => void;

                                                                                                                                                                                      method handleClick

                                                                                                                                                                                      handleClick: (e: MouseEvent | React.MouseEvent<HTMLAnchorElement>) => void;

                                                                                                                                                                                        method render

                                                                                                                                                                                        render: () => any;

                                                                                                                                                                                          class ToolbarSelect

                                                                                                                                                                                          class ToolbarSelect extends React.Component<
                                                                                                                                                                                          ToolbarSelectProps,
                                                                                                                                                                                          ToolbarSelectState
                                                                                                                                                                                          > {}

                                                                                                                                                                                            constructor

                                                                                                                                                                                            constructor(props: ToolbarSelectProps);

                                                                                                                                                                                              property handleOpen

                                                                                                                                                                                              handleOpen: (e: any) => void;

                                                                                                                                                                                                method componentWillUnmount

                                                                                                                                                                                                componentWillUnmount: () => void;

                                                                                                                                                                                                  method handleClick

                                                                                                                                                                                                  handleClick: (e: MouseEvent) => void;

                                                                                                                                                                                                    method render

                                                                                                                                                                                                    render: () => any;

                                                                                                                                                                                                      class VariableEditor

                                                                                                                                                                                                      class VariableEditor extends React.Component<VariableEditorProps> {}

                                                                                                                                                                                                        constructor

                                                                                                                                                                                                        constructor(props: VariableEditorProps);

                                                                                                                                                                                                          property cachedValue

                                                                                                                                                                                                          cachedValue: string;

                                                                                                                                                                                                            property CodeMirror

                                                                                                                                                                                                            CodeMirror: any;

                                                                                                                                                                                                              property editor

                                                                                                                                                                                                              editor: any;

                                                                                                                                                                                                                property ignoreChangeEvent

                                                                                                                                                                                                                ignoreChangeEvent: boolean;

                                                                                                                                                                                                                  method componentDidMount

                                                                                                                                                                                                                  componentDidMount: () => void;

                                                                                                                                                                                                                    method componentDidUpdate

                                                                                                                                                                                                                    componentDidUpdate: (prevProps: VariableEditorProps) => void;

                                                                                                                                                                                                                      method componentWillUnmount

                                                                                                                                                                                                                      componentWillUnmount: () => void;

                                                                                                                                                                                                                        method getClientHeight

                                                                                                                                                                                                                        getClientHeight: () => number | null;

                                                                                                                                                                                                                          method getCodeMirror

                                                                                                                                                                                                                          getCodeMirror: () => any;

                                                                                                                                                                                                                            method render

                                                                                                                                                                                                                            render: () => any;

                                                                                                                                                                                                                              Interfaces

                                                                                                                                                                                                                              interface Storage

                                                                                                                                                                                                                              interface Storage {}

                                                                                                                                                                                                                                property getItem

                                                                                                                                                                                                                                getItem: (key: string) => string | null;

                                                                                                                                                                                                                                  property length

                                                                                                                                                                                                                                  length: number;

                                                                                                                                                                                                                                    property removeItem

                                                                                                                                                                                                                                    removeItem: (key: string) => void;

                                                                                                                                                                                                                                      property setItem

                                                                                                                                                                                                                                      setItem: (key: string, value: string) => void;

                                                                                                                                                                                                                                        Type Aliases

                                                                                                                                                                                                                                        type GraphiQLProps

                                                                                                                                                                                                                                        type GraphiQLProps = {
                                                                                                                                                                                                                                        fetcher: Fetcher;
                                                                                                                                                                                                                                        schema?: GraphQLSchema;
                                                                                                                                                                                                                                        validationRules?: ValidationRule[];
                                                                                                                                                                                                                                        query?: string;
                                                                                                                                                                                                                                        variables?: string;
                                                                                                                                                                                                                                        headers?: string;
                                                                                                                                                                                                                                        operationName?: string;
                                                                                                                                                                                                                                        response?: string;
                                                                                                                                                                                                                                        storage?: Storage;
                                                                                                                                                                                                                                        defaultQuery?: string;
                                                                                                                                                                                                                                        defaultVariableEditorOpen?: boolean;
                                                                                                                                                                                                                                        defaultSecondaryEditorOpen?: boolean;
                                                                                                                                                                                                                                        headerEditorEnabled?: boolean;
                                                                                                                                                                                                                                        shouldPersistHeaders?: boolean;
                                                                                                                                                                                                                                        externalFragments?: string | FragmentDefinitionNode[];
                                                                                                                                                                                                                                        onCopyQuery?: (query?: string) => void;
                                                                                                                                                                                                                                        onEditQuery?: (query?: string, documentAST?: DocumentNode) => void;
                                                                                                                                                                                                                                        onEditVariables?: (value: string) => void;
                                                                                                                                                                                                                                        onEditHeaders?: (value: string) => void;
                                                                                                                                                                                                                                        onEditOperationName?: (operationName: string) => void;
                                                                                                                                                                                                                                        onToggleDocs?: (docExplorerOpen: boolean) => void;
                                                                                                                                                                                                                                        getDefaultFieldNames?: GetDefaultFieldNamesFn;
                                                                                                                                                                                                                                        editorTheme?: string;
                                                                                                                                                                                                                                        onToggleHistory?: (historyPaneOpen: boolean) => void;
                                                                                                                                                                                                                                        ResultsTooltip?: typeof Component | FunctionComponent;
                                                                                                                                                                                                                                        readOnly?: boolean;
                                                                                                                                                                                                                                        docExplorerOpen?: boolean;
                                                                                                                                                                                                                                        toolbar?: GraphiQLToolbarConfig;
                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                          Package Files (15)

                                                                                                                                                                                                                                          Dependencies (8)

                                                                                                                                                                                                                                          Dev Dependencies (39)

                                                                                                                                                                                                                                          Peer Dependencies (3)

                                                                                                                                                                                                                                          Badge

                                                                                                                                                                                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/graphiql.

                                                                                                                                                                                                                                          • Markdown
                                                                                                                                                                                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/graphiql)
                                                                                                                                                                                                                                          • HTML
                                                                                                                                                                                                                                            <a href="https://www.jsdocs.io/package/graphiql"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>