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

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [DefaultCrudRepository](./repository.defaultcrudrepository.md) &gt; [registerInclusionResolver](./repository.defaultcrudrepository.registerinclusionresolver.md)

## DefaultCrudRepository.registerInclusionResolver() method

Register an inclusion resolver for the related model name.

<b>Signature:</b>

```typescript
registerInclusionResolver(relationName: string, resolver: InclusionResolver<T, Entity>): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  relationName | string | Name of the relation defined on the source model |
|  resolver | [InclusionResolver](./repository.inclusionresolver.md)<!-- -->&lt;T, [Entity](./repository.entity.md)<!-- -->&gt; | Resolver function for getting related model entities |

<b>Returns:</b>

void


