import Morphik from 'morphik';const client = new Morphik({ apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted});const graph = await client.graph.retrieve('name');console.log(graph.id);
This endpoint retrieves a graph by its name if the user has access to it.
GET
/
graph
/
{name}
JavaScript
Copy
Ask AI
import Morphik from 'morphik';const client = new Morphik({ apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted});const graph = await client.graph.retrieve('name');console.log(graph.id);