> For the complete documentation index, see [llms.txt](https://ra-libs.gitbook.io/nestjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ra-libs.gitbook.io/nestjs/utils/removeoutputrelations.md).

# removeOutputRelations

Remove relations fields from prisma results.

## Usage

```typescript
import { removeOutputRelations } from '@ra-libs/nestjs'

@Injectable()
export class Service {

    private relations = ["client", "seller"]

    return this.prisma.$transaction([
      this.prisma.document.findMany(query),
      this.prisma.document.count({ where: query.where || {} }),
    ]).then(data => {
      return removeOutputRelations(data, this.relations)
    })
}
```

the removeOutputRelations used above will remove the client and seller field from the final results.
