Skip to content

GraphPluginInstance

Unofficial

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

Import:

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

Signature:

export interface GraphPluginInstance extends InternalPluginInstance<GraphPlugin>

Extends: InternalPluginInstance<GraphPlugin>

Properties

Property Type Description
app App Reference to the Obsidian app instance.
defaultOn true Whether the graph plugin is enabled by default.
description string Human-readable description of this plugin.
(Inherited from InternalPluginInstance)
id string Unique identifier for this plugin.
(Inherited from InternalPluginInstance)
name string Human-readable display name of this plugin.
(Inherited from InternalPluginInstance)
options GraphPluginInstanceOptions User-configurable options for the graph plugin.
plugin GraphPlugin Reference to the parent graph plugin.

Methods

Method Returns Description
init(app, plugin) void Initialize the plugin instance with app and plugin references.
(Inherited from InternalPluginInstance)
onDisable(app, plugin) void Called 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?) void Add graph-related items to the file context menu.
onUserDisable(app) void Called when the user manually disables the plugin.
(Inherited from InternalPluginInstance)
onUserEnable(app) void Called when the user manually enables the plugin.
(Inherited from InternalPluginInstance)
openGraphView(newLeaf) void Open the global graph view.
openLocalGraph(checking) true | undefined Open the local graph view for the current file.
saveOptions() void Saves the options in graph.json.

Links to this page: