Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@gabrieljsilva/nestjs-graphql-filter-adapter-prisma
Advanced tools
Prisma adapter for nestjs graphql filters library
An adapter from Prisma ORM to the library @gabrieljsilva/nestjs-graphql-filter
npm i nestjs-graphql-filter-adapter-prisma
or
yarn add nestjs-graphql-filter-adapter-prisma
After installing the library @gabrieljsilva/nestjs-graphql-filter you must register the adapter in the filter module, as follows the code below.
import { Module } from '@nestjs/common';
import { GraphqlFilterModule } from '@gabrieljsilva/nestjs-graphql-filter';
import { PrismaFilterAdapter } from '@gabrieljsilva/nestjs-graphql-filter-adapter-prisma';
import { PrismaModule } from '@prisma/module/prisma.module';
import { UserModule } from './packages';
import { GraphqlModule } from './infra/graphql';
@Module({
imports: [
GraphqlFilterModule.forRoot(PrismaFilterAdapter),
GraphqlModule,
PrismaModule,
UserModule,
],
controllers: [],
providers: [],
})
export class AppModule {}
Then you can generate the queries using GraphqlFilterService
:
import { Injectable } from '@nestjs/common';
import { GraphqlFilterService } from '@gabrieljsilva/nestjs-graphql-filter';
import { Prisma } from '@prisma/client';
import { PrismaService } from '@prisma/module/prisma.service';
import { UserFilters } from '../../../../domain/filterables';
@Injectable()
export class UserService {
constructor(
private readonly prisma: PrismaService,
private readonly graphqlFilterService: GraphqlFilterService,
) {}
async getManyUsers(filters?: UserFilters) {
const findUsersFilters = this.graphqlFilterService.getQuery<Prisma.UserWhereInput>(filters);
return this.prisma.user.findMany({
where: findUsersFilters,
});
}
}
FAQs
Prisma adapter for nestjs graphql filters library
The npm package @gabrieljsilva/nestjs-graphql-filter-adapter-prisma receives a total of 0 weekly downloads. As such, @gabrieljsilva/nestjs-graphql-filter-adapter-prisma popularity was classified as not popular.
We found that @gabrieljsilva/nestjs-graphql-filter-adapter-prisma demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.