Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 642 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 642 Bytes

pg-sourcerer

a tool to generate code from Postgres introspection data

getting started

currently this is still a work-in-progress. to see what's working so far, after cloning the repo:

npm install
cd examples
npm install
npm setup

the setup script will

  • prompt for questions and generate a .env file
  • start postgres in a docker container
  • run migrations using graphile-migrate
  • run the sourcerer plugins in the config file

plugins

currently there are a few core plugins:

  • makeTypesPlugin - generates type aliases
  • makeZodSchemasPlugin - generates zod schemas
  • makeQueriesPlugin - generates CRUD queries