The functions send the entire operation so users can customize their own application with <HistoryContext.Provider value={customizedFunctions} /> and get access to the operation plus any additional props they added for their needs (i.e., build their own functions that may save to a backend instead of localStorage and might need an id property added to the QueryStoreItem)
Add an operation to the history.
The operation that was executed, consisting of the query, variables, headers, and operation name.
Delete an operation from the history.
The operation that was executed, consisting of the query, variables, headers, and operation name.
This is only if you press the 'clear' button
Change the custom label of an item from the history.
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.)
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
If you need to know when an item in history is set as active to customize your application.
Toggle the favorite state of an item from the history.
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.)
Generated using TypeDoc
@graphiql/plugin-history