Skip to content

GraphPluginInstance

Unofficial

Instance of the graph internal plugin, managing graph views and options.

Import:

import type { GraphPluginInstance } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface GraphPluginInstance extends InternalPluginInstance<GraphPlugin>

Extends: InternalPluginInstance<GraphPlugin>

Properties

PropertyTypeDescription
appAppReference to the Obsidian app instance.
defaultOntrueWhether the graph plugin is enabled by default.
descriptionstringHuman-readable description of this plugin.
(Inherited from InternalPluginInstance)
idstringUnique identifier for this plugin.
(Inherited from InternalPluginInstance)
namestringHuman-readable display name of this plugin.
(Inherited from InternalPluginInstance)
optionsGraphPluginInstanceOptionsUser-configurable options for the graph plugin.
pluginGraphPluginReference to the parent graph plugin.

Methods

MethodReturnsDescription
init(app, plugin)voidInitialize the plugin instance with app and plugin references.
(Inherited from InternalPluginInstance)
onDisable(app, plugin)voidCalled when the plugin is disabled.
(Inherited from InternalPluginInstance)
onEnable(app, plugin)Promise<void>Called when the plugin is enabled.
(Inherited from InternalPluginInstance)
onExternalSettingsChange()Promise<void>Reload options when settings are changed externally.
onFileMenu(menu, file, source, leaf?)voidAdd graph-related items to the file context menu.
onUserDisable(app)voidCalled when the user manually disables the plugin.
(Inherited from InternalPluginInstance)
onUserEnable(app)voidCalled when the user manually enables the plugin.
(Inherited from InternalPluginInstance)
openGraphView(newLeaf)voidOpen the global graph view.
openLocalGraph(checking)true | undefinedOpen the local graph view for the current file.
saveOptions()voidSaves the options in graph.json.

Links to this page: