
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
@travelerdev/nestjs-sentry-graphql
Advanced tools
Provides an injectable sentry.io client to provide enterprise logging of nestjs modules with GraphQL
Provides an injectable sentry.io client to provide enterprise logging of nestjs modules using GraphQL
@travelerdev/nestjs-sentry-graphql
is an extension of @travelerdev/nestjs-sentry
, which is
itself built upon the foundation developed by
@ntegral/nestjs-sentry
.
This package implements a module, SentryModule
which when imported into your nestjs project
provides a Sentry.io client to any class that injects it. This lets Sentry.io be worked into your
dependency injection workflow without having to do any extra work outside of the initial setup.
It also implements a class, GraphqlInterceptor
, which can intercept resolver errors into Sentry.
If you do not use graphql, you should consider using @travelerdev/nestjs-sentry
instead to avoid
unnecessary dependencies.
For details getting started instructions, see @travelerdev/nestjs-sentry
npm install --save @travelerdev/nestjs-sentry-graphql @nestjs/graphql
To get started with @travelerdev/nestjs-sentry-graphql
you should add an import of
SentryModule.forRoot
to your app's root module.
import { Module } from '@nestjs-common';
import { SentryModule } from '@travelerdev/nestjs-sentry-graphql';
@Module({
imports: [
SentryModule.forRoot({
dsn: '<< your sentry_io_dsn >>',
debug: true | false,
environment: 'dev' | 'production' | 'some_environment',
release: 'some_release', | null, // must first create a release in sentry.io dashboard
logLevels: ["debug"] //based on sentry.io loglevel //
}),
],
})
export class AppModule {}
There are other instantiation methods documented in @travelerdev/nestjs-sentry
's readme.
The GraphqlInterceptor in this package can be used at the App level to intercept resolver errors and pass them up to Sentry.
Using graphql interceptor globally:
import { Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { GraphqlInterceptor } from '@travelerdev/nestjs-sentry-graphql';
@Module({
....
providers: [
{
provide: APP_INTERCEPTOR,
useFactory: () => new GraphqlInterceptor(),
},
],
})
export class AppModule {}
FAQs
Provides an injectable sentry.io client to provide enterprise logging of nestjs modules with GraphQL
The npm package @travelerdev/nestjs-sentry-graphql receives a total of 1,595 weekly downloads. As such, @travelerdev/nestjs-sentry-graphql popularity was classified as popular.
We found that @travelerdev/nestjs-sentry-graphql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.