---
lang: en
title: 'API docs: context.resolutionsession'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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

<b>Signature:</b>

```typescript
export declare class ResolutionSession 
```

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [bindingStack](./context.resolutionsession.bindingstack.md) |  | <code>Readonly&lt;Binding&gt;[]</code> | Getter for bindings on the stack |
|  [currentBinding](./context.resolutionsession.currentbinding.md) |  | <code>Readonly&lt;Binding&gt; &#124; undefined</code> | Getter for the current binding |
|  [currentInjection](./context.resolutionsession.currentinjection.md) |  | <code>Readonly&lt;Injection&gt; &#124; undefined</code> | Getter for the current injection |
|  [injectionStack](./context.resolutionsession.injectionstack.md) |  | <code>Readonly&lt;Injection&gt;[]</code> | Getter for injections on the stack |
|  [stack](./context.resolutionsession.stack.md) |  | <code>ResolutionElement[]</code> | A stack of bindings for the current resolution session. It's used to track the path of dependency resolution and detect circular dependencies. |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [describeInjection(injection)](./context.resolutionsession.describeinjection.md) | <code>static</code> | Describe the injection for debugging purpose |
|  [fork(session)](./context.resolutionsession.fork.md) | <code>static</code> | 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 |
|  [getBindingPath()](./context.resolutionsession.getbindingpath.md) |  | Get the binding path as <code>bindingA --&gt; bindingB --&gt; bindingC</code>. |
|  [getInjectionPath()](./context.resolutionsession.getinjectionpath.md) |  | Get the injection path as <code>injectionA --&gt; injectionB --&gt; injectionC</code>. |
|  [getResolutionPath()](./context.resolutionsession.getresolutionpath.md) |  | Get the resolution path including bindings and injections, for example: <code>bindingA --&gt; @ClassA[0] --&gt; bindingB --&gt; @ClassB.prototype.prop1 --&gt; bindingC</code>. |
|  [popBinding()](./context.resolutionsession.popbinding.md) |  | Exit the resolution of a binding |
|  [popInjection()](./context.resolutionsession.popinjection.md) |  | Pop the last injection |
|  [pushBinding(binding)](./context.resolutionsession.pushbinding.md) |  | Enter the resolution of the given binding. If |
|  [pushInjection(injection)](./context.resolutionsession.pushinjection.md) |  | Push the injection onto the session |
|  [runWithBinding(action, binding, session)](./context.resolutionsession.runwithbinding.md) | <code>static</code> | Run the given action with the given binding and session |
|  [runWithInjection(action, injection, session)](./context.resolutionsession.runwithinjection.md) | <code>static</code> | Run the given action with the given injection and session |


