0.0.20 • Published 3 years ago

@rsbear/gp-schematic v0.0.20

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

GraphQL Prisma Schematic

Generate your GraphQL schema from your Prisma schema.

Why?

Maintaining a GraphQL schema is tedious and quite frankly pretty annoying. Generating full CRUD APIs isn't my speed as I feel they significantly muddy the schema. It's pretty clear that Prisma's schema syntax is inspired by GraphQL - why not parse that schema and create a basic GraphQL types next to it? So that's what this is, parse the schema.prisma and create schema.graphql

Install as a dev dep.

yarn add --dev @rsbear/gp-schematic

Add this script to your package.json (please note the input and output flags and manage accordingly)

 "generate:schema": "node node_modules/@rsbear/gp-schematic/dist/index.js --input=prisma/schema.prisma --output=graphql/schema.graphql"

Run it.

yarn generate:schema

What about the schema being incomplete?

Use graphql-tools and concat the rest of everything you need.. I'll put up an example later

0.0.20

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago