Skip to content
This repository was archived by the owner on Jan 8, 2023. It is now read-only.

prisma-korea/graphql-schema-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d244615 Â· Jan 14, 2022

History

85 Commits
Dec 21, 2021
Dec 16, 2021
Jan 13, 2022
Jan 13, 2022
Dec 18, 2021
Jan 13, 2022
Dec 16, 2021
Dec 16, 2021
Dec 16, 2021
Dec 18, 2021
Dec 17, 2021
Dec 14, 2021
Jan 14, 2022
Dec 14, 2021
Dec 16, 2021
Jan 13, 2022
Jan 14, 2022
Jan 13, 2022
Dec 16, 2021
Dec 16, 2021
Jan 13, 2022

Repository files navigation

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.