HACKER Q&A
📣 yonz

Locally generate GraphQL schema and resolvers from DB


Does anyone have a local equivalent for Hasura GraphQL engine? "The Hasura GraphQL engine automatically generates your GraphQL schema and resolvers based on your tables/views in your database. You don't need to write a GraphQL schema or resolvers." https://hasura.io/docs/latest/schema/index/

Dgraph.app and Amazon's AppSync do this already from a backend but I am looking for something that can run locally. At a high level, the engine is a GraphQL ORM for data in SQLite or WatermelonDB.


  👤 AccountAccount1 Accepted Answer ✓
What do you mean locally? Hasura is OSS, and you can run it locally (you have autogenerated SQL statements) Here you can just use Nhost and its CLI;

Alternatives are https://github.com/graphile/postgraphile or dgraph as you mentioned. Hasura is working on support for sqlite, so you may have some blockers there, you can also look into the Prisma engine which has GQL as an intermediate (for resolvers, for example)