# middleware

{% hint style="danger" %}
#### This configuration option has been deprecated in API version v2.0.0.

This version introduced Project Toolchain, which took over the code generation done in Prisma Util with the scope of creating a more unified backend API. Because of this introduction, this configuration option won't have any effects after `v2.0.0`.
{% endhint %}

{% hint style="info" %}
#### Experimental Feature

This configuration entry is related to an Experimental (Optional) feature called pg\_trgm Support. Before you start to configure this section, make sure to read the page specific for this feature (accessible [here](../../optional-features/schema-improvements/pgtrgm-support)) and [this](../../concepts/experimental-features) page that explains how to enable Experimental Features.
{% endhint %}

### Type: [Path](../types-and-objects/path)

<details>

<summary>Versioning History</summary>

**API Version v1.3.0** - Introduced `middleware` configuration option.

**API Version v2.0.0** - Removed `middleware` configuration option.

</details>

The path where the middleware created by Prisma Util should be written to. To configure this path, add the following line to your exported configuration object:&#x20;

{% code title="prisma-util.config.mjs" %}
```javascript
export default {
    // Other configuration lines
    middleware: "pathToMiddleware.ts"
};
```
{% endcode %}
