@ra-libs/nestjs
  • Home
  • interceptors
    • PrismaRAInterceptor
  • Utils
    • getFilterValue
    • includeReferencesIDs
    • includeRelations
    • removeOutputRelations
    • transformFindAllOutputArraysToIds
    • transformInputsToPrisma
    • transformOutputArraysToIds
    • withFilterField
    • withQSeach
Powered by GitBook
On this page
  • Global usage
  • Per controller usage
  1. interceptors

PrismaRAInterceptor

Global usage

import { PrismaRAInterceptor } from '@ra-libs/nestjs'

async function bootstrap() {

  const app = await NestFactory.create(AppModule, { cors: true });

  // ...
  app.useGlobalInterceptors(new PrismaRAInterceptor());
  // ...
}

bootstrap();

Per controller usage

import { PrismaRAInterceptor } from '@ra-libs/nestjs';

@UseInterceptors(PrismaRAInterceptor)
export class CatsController {}
PreviousHomeNextgetFilterValue

Last updated 2 years ago

Check nestjs interceptor binding

documentation