Skip to main content

Function: registerMapSource()

function registerMapSource(source: GraphSource): void

Registers a new graph source in the store.

Parameters

ParameterTypeDescription
sourceGraphSourceThe graph source to be registered.

Returns

void

Example

const mySource = {
id: 'my-source',
label: 'Sample source',
useData() {
return {
nodes: [{ id: 'my-node', type: 'kubeObject', data: { resource: myCustomResource } }],
edges: []
};
}
}

registerMapSource(mySource);

Defined in

src/plugin/registry.tsx:824