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

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

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ResolutionSession](./context.resolutionsession.md)

## ResolutionSession class

Object to keep states for a session to resolve bindings and their dependencies within a context

**Signature:**

```typescript
export declare class ResolutionSession 
```

## Properties

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

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


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

[bindingStack](./context.resolutionsession.bindingstack.md)


</td><td>

`readonly`


</td><td>

Readonly&lt;[Binding](./context.binding.md)<!-- -->&gt;\[\]


</td><td>

Getter for bindings on the stack


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

[currentBinding](./context.resolutionsession.currentbinding.md)


</td><td>

`readonly`


</td><td>

Readonly&lt;[Binding](./context.binding.md)<!-- -->&gt; \| undefined


</td><td>

Getter for the current binding


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

[currentInjection](./context.resolutionsession.currentinjection.md)


</td><td>

`readonly`


</td><td>

Readonly&lt;[Injection](./context.injection.md)<!-- -->&gt; \| undefined


</td><td>

Getter for the current injection


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

[injectionStack](./context.resolutionsession.injectionstack.md)


</td><td>

`readonly`


</td><td>

Readonly&lt;[Injection](./context.injection.md)<!-- -->&gt;\[\]


</td><td>

Getter for injections on the stack


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

[stack](./context.resolutionsession.stack.md)


</td><td>

`readonly`


</td><td>

[ResolutionElement](./context.resolutionelement.md)<!-- -->\[\]


</td><td>

A stack of bindings for the current resolution session. It's used to track the path of dependency resolution and detect circular dependencies.


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

## Methods

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

Method


</th><th>

Modifiers


</th><th>

Description


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

[describeInjection(injection)](./context.resolutionsession.describeinjection.md)


</td><td>

`static`


</td><td>

Describe the injection for debugging purpose


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

[fork(session)](./context.resolutionsession.fork.md)


</td><td>

`static`


</td><td>

Fork the current session so that a new one with the same stack can be used in parallel or future resolutions, such as multiple method arguments, multiple properties, or a getter function


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

[getBindingPath()](./context.resolutionsession.getbindingpath.md)


</td><td>


</td><td>

Get the binding path as `bindingA --> bindingB --> bindingC`<!-- -->.


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

[getInjectionPath()](./context.resolutionsession.getinjectionpath.md)


</td><td>


</td><td>

Get the injection path as `injectionA --> injectionB --> injectionC`<!-- -->.


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

[getResolutionPath()](./context.resolutionsession.getresolutionpath.md)


</td><td>


</td><td>

Get the resolution path including bindings and injections, for example: `bindingA --> @ClassA[0] --> bindingB --> @ClassB.prototype.prop1 --> bindingC`<!-- -->.


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

[popBinding()](./context.resolutionsession.popbinding.md)


</td><td>


</td><td>

Exit the resolution of a binding


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

[popInjection()](./context.resolutionsession.popinjection.md)


</td><td>


</td><td>

Pop the last injection


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

[pushBinding(binding)](./context.resolutionsession.pushbinding.md)


</td><td>


</td><td>

Enter the resolution of the given binding. If


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

[pushInjection(injection)](./context.resolutionsession.pushinjection.md)


</td><td>


</td><td>

Push the injection onto the session


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

[runWithBinding(action, binding, session)](./context.resolutionsession.runwithbinding.md)


</td><td>

`static`


</td><td>

Run the given action with the given binding and session


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

[runWithInjection(action, injection, session)](./context.resolutionsession.runwithinjection.md)


</td><td>

`static`


</td><td>

Run the given action with the given injection and session


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

[toString()](./context.resolutionsession.tostring.md)


</td><td>


</td><td>


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

