Socket
Socket
Sign inDemoInstall

@akumzy/graphql-schema-generator

Package Overview
Dependencies
4
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @akumzy/graphql-schema-generator

Generate Graphql schema(SDL) from Prisma schema using Prisma generator.


Version published
Maintainers
1
Created

Readme

Source

GraphQL-Schema-Generator for Prisma

CI codecov

Generate GraphQL schema (SDL) from Prisma schema using a custom Prisma generator.

Getting Started

  1. Install this package in your project using:
// pnpm, npm, or yarn
pnpm install @prisma-korea/graphql-schema-generator
  1. Add the generator to the schema.prisma:
generator graphql {
  provider = "graphql-schema-generator"
  createCRUD = "true"
  # output = "./generated" This is default path.
}
  1. Run npx prisma generate to run the generator

  2. Check schema.graphql in ./prisma/generated 🎉

Custom Rules

You can apply custom rules to manipulate behavior. (Some use cases). See this for example.

Example dir structure

image

Example usage

generator graphql {
  provider = "graphql-schema-generator"
  output   = "../src/schemas"
  createCRUD = "true"
  customRules = "../prisma/rules.ts"
}

Example rules code

Contributing

Any contributions are welcome. If you are interested, check out our guidelines.

Keywords

FAQs

Last updated on 08 Dec 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc