GraphiQL API Documentation
    Preparing search index...
    • Actions are functions used to update values in your store. They are static and never change.

      Returns {
          addToHistory(
              operation: {
                  headers?: string;
                  operationName?: string;
                  query?: string;
                  variables?: string;
              },
          ): void;
          deleteFromHistory(args: QueryStoreItem, clearFavorites?: boolean): void;
          editLabel(
              args: {
                  favorite?: boolean;
                  headers?: string;
                  label?: string;
                  operationName?: string;
                  query?: string;
                  variables?: string;
              },
              index?: number,
          ): void;
          setActive(args: QueryStoreItem): void;
          toggleFavorite(
              args: {
                  favorite?: boolean;
                  headers?: string;
                  label?: string;
                  operationName?: string;
                  query?: string;
                  variables?: string;
              },
          ): void;
      }

      • addToHistory: function
        • Add an operation to the history.

          Parameters

          • operation: { headers?: string; operationName?: string; query?: string; variables?: string }

            The operation that was executed, consisting of the query, variables, headers, and operation name.

          Returns void

      • deleteFromHistory: function
        • Delete an operation from the history.

          Parameters

          • args: QueryStoreItem

            The operation that was executed, consisting of the query, variables, headers, and operation name.

          • OptionalclearFavorites: boolean

            This is only if you press the 'clear' button

          Returns void

      • editLabel: function
        • Change the custom label of an item from the history.

          Parameters

          • args: {
                favorite?: boolean;
                headers?: string;
                label?: string;
                operationName?: string;
                query?: string;
                variables?: string;
            }

            An object containing the label (undefined if it should be unset) and properties that identify the history item that the label should be applied to. (This can result in the label being applied to multiple history items.)

          • Optionalindex: number

            Index to edit. Without it, will look for the first index matching the operation, which may lead to misleading results if multiple items have the same label

          Returns void

      • setActive: function
        • If you need to know when an item in history is set as active to customize your application.

          Parameters

          • args: QueryStoreItem

          Returns void

      • toggleFavorite: function
        • Toggle the favorite state of an item from the history.

          Parameters

          • args: {
                favorite?: boolean;
                headers?: string;
                label?: string;
                operationName?: string;
                query?: string;
                variables?: string;
            }

            An object containing the favorite state (undefined if it should be unset) and properties that identify the history item that the label should be applied to. (This can result in the label being applied to multiple history items.)

          Returns void