Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-prisma-nestjs-graphql

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-prisma-nestjs-graphql

eslint plugin for prisma & nestjs & graphql setups to not forget resolvers etc.

  • 0.1.3
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-prisma-nestjs-graphql

Goal of the plugin (p):

  • I always forgot some field-resolvers in my graphql resolver files.
  • I wrote myself a little eslint p to check the prisma.schema entities' relations against the field resolvers in my files.
  • Additionally, the p can auto-fix missing resolvers (means it inserts them (quite) the right way).
  • Together with lint --fix it can auto-generate all your (basic) field resolvers.
  • So the overall goal is to save you and me from error-prone, manual field resolver coding.
  • This p will (atm) not check if you implemented all models of your prisma file, just if there is a model resolver => it will check if the field resolvers are there

How to use the p:

  • Install it: npm i -D eslint-plugin-prisma-nestjs-graphql
  • It needs you to also use https://www.npmjs.com/package/prisma-json-schema-generator as generator for your prisma setup.
  • The p will look for a file called prisma/generated/json-schema.json which should be generated by the prisma-json-schema-generator
  • Therefore the generator should look somewhat like that:
...
generator jsonSchema {
  provider = "prisma-json-schema-generator"
  output   = "./generated/"
}
...

Known issues

  • Paths are inflexible
    • Will hopefully be adressed in the future

npm package: https://www.npmjs.com/package/eslint-plugin-prisma-nestjs-graphql prisma-nestjs-graphql resource generator: LINK

FAQs

Package last updated on 30 Jan 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc