I found a recent project that does just that. He called Gestalt . It only works with Postgres right now, but it looks pretty promising. Checkout Getting Started is quite simple to set up.
As long as you have PostgreSQL installed and running, you can run the following to start the project:
npm install --global gestalt-cli createdb blogs gestalt init blogs cd blogs read -r -d '' VARIABLE << EOM type Session implements Node { id: ID! } type User implements Node { id: ID! email: String! @unique passwordHash: String! @hidden } type Post implements Node { id: ID! text: String! createdAt: Date! } EOM echo "$VARIABLE" > schema.graphql gestalt migrate npm start
Hooray! it works now, you can open GraphiQL in your browser:
open http:
Now, at any time, you can modify schema.graphql and then run gestalt migrate to update PostgreSQL and GraphQL.
source share