---
lang: en
title: 'API docs: context.resolutionsession.fork'
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.fork.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) &gt; [fork](./context.resolutionsession.fork.md)

## ResolutionSession.fork() method

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

<b>Signature:</b>

```typescript
static fork(session?: ResolutionSession): ResolutionSession | undefined;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  session | [ResolutionSession](./context.resolutionsession.md) | <i>(Optional)</i> The current session |

<b>Returns:</b>

[ResolutionSession](./context.resolutionsession.md) \| undefined


