---
lang: en
title: 'API docs: context-explorer.contextgraph'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/extensions/context-explorer
permalink: /doc/en/lb4/apidocs.context-explorer.contextgraph.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context-explorer](./context-explorer.md) &gt; [ContextGraph](./context-explorer.contextgraph.md)

## ContextGraph class

A graph for context hierarchy

**Signature:**

```typescript
export declare class ContextGraph 
```

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(ctx, options)](./context-explorer.contextgraph._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `ContextGraph` class


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[build()](./context-explorer.contextgraph.build.md)


</td><td>


</td><td>

Build a direct graph


</td></tr>
<tr><td>

[render()](./context-explorer.contextgraph.render.md)


</td><td>


</td><td>

Render the context graph in graphviz dot format


</td></tr>
<tr><td>

[renderBinding(parent, { binding, id })](./context-explorer.contextgraph.renderbinding.md)


</td><td>

`protected`


</td><td>

Render a binding object


</td></tr>
<tr><td>

[renderConfig(parent, { binding, level, id })](./context-explorer.contextgraph.renderconfig.md)


</td><td>

`protected`


</td><td>

Create an edge for a binding to its configuration


</td></tr>
</tbody></table>

