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.
@bytegem/nest-gql-mix
Advanced tools
NestJS + GraphQL(code first) + Prisma, Help you to implement the Prisma template interface as a GraphQL(code first) Type classes. 🎉Fast work!
NestJS + GraphQL(code first) + Prisma, Help you to implement the Prisma template interface as a GraphQL(code first) Type classes. 🎉Fast work!
Via NPM:
npm i @bytegem/nest-gql-mix
Or via Yarn:
yarn add @bytegem/nest-gql-mix
Before using this package:
@InputType({ description: 'This is User where input' })
export class UserWhereInput implements Prisma.UserWhereInput {
@Field((type) => [UserWhereInput], { nullable: true })
AND?: UserWhereInput[];
@Field((type) => [UserWhereInput], { nullable: true })
OR?: UserWhereInput[];
@Field((type) => [UserWhereInput], { nullable: true })
NOT?: UserWhereInput[];
@Field((type) => StringFilter, { nullable: true })
id?: StringFilter;
@Field((type) => StringFilter, { nullable: true })
username?: StringFilter;
@Field((type) => StringFilter, { nullable: true })
email?: StringFilter;
@Field((type) => StringFilter, { nullable: true })
phone?: StringFilter;
/// More fields...
Now:
@InputTypeBuilder(
{ description: 'User where input' },
FieldsBuilderOptionHelper(
['id', 'username', 'email', 'phone', /* ...more fields */],
() => StringFilter,
{ nullable: true },
),
)
export class UserWhereInput extends InterfaceTransformAbstract<Prisma.UserWhereInput>>() {}
extends InterfaceTransformAbstract<T>()
is optional. After adding it, you can prompt the IDE code when you actively use this class. Not inheriting has no effect on the actual operation.
ArgsTypeBuilder
: The ArgsType
class builder.
FindFirstArgsBuilder
: Fast build Prisma ${Model}FindFirst
args class.FindManyArgsBuilder
: Fast build Prisma ${Model}FindMany
args class.InputTypeBuilder
: The InputType
class builder.
WhereInputTypeBuilder
: Fast build Prisma ${Model}WhereInput
input class.RelationFilterBuilder
: Fast build Prisma ${Model}ListRelationFilter
input class.InterfaceTypeBuilder
: The InterfaceType
class builder.ObjectTypeBuilder
: The ObjectType
class builder.FieldsBuilderOptionHelper
: Passing [Args|Object|Input|Interface]TypeBuilder parameters does not simplify much code work. For multiple fields with the same FieldOptions, you can use this tool to quickly generate.InterfaceTransformAbstract
: You can transform the interface class into an abstract class to help IDE with code hints.The package is MIT License.
FAQs
NestJS + GraphQL(code first) + Prisma, Help you to implement the Prisma template interface as a GraphQL(code first) Type classes. 🎉Fast work!
The npm package @bytegem/nest-gql-mix receives a total of 0 weekly downloads. As such, @bytegem/nest-gql-mix popularity was classified as not popular.
We found that @bytegem/nest-gql-mix 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.
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.