Lurker News

Comments (103) 27 threads

Earlier comments
zapita1 reply#
This is exactly what I was looking for. I will give it a try on my next project.
alberteinstein#
Please do reach out to us on discord [1] if you have any questions whatsoever :)

[1]: https://discord.gg/vBPpJkS

spocklivelong1 reply#
I work with a Django app on Postgres, and I'm not sure how I would migrate that to GraphQL. How things play out in terms of django specific tables? What about relationships between tables? We mostly use the Django app to expose REST APIs, which deal with making complex queries using QuerySets to Postgres. Moving this to GraphQL mean that all the business logic that sits on the REST APIs need to be moved to the frontend?
tango12#
Well it depends on your app. Technically, you have to rebuild your app to speak GraphQL to the frontend instead of REST. Internally, your GraphQL resolvers (like URL handlers) would then do similar work with using QuerySets as you're doing now.

If you'd like to leverage Hasura, it would be a good fit to potentially replace the "read" portions of your app with GraphQL quite easily. And then eventually you would have to move to writing a GraphQL gateway to handle some of the transactional logic and delegate the other stuff to Hasura via schema-stitching.

uptime1 reply#
Thank you for releasing this. I am impressed with Hasura! No knock on postgraphile, I am trying that out too as well as prisma, but this looks very well done and the boundaries are clear (like postgraphile, views are important to make things work). Your UI is going to make people happy.

I have two questions: 1. can I point the hasura cli at my local install? and 2. Can we have UUID fields? I'd like to use them as primary keys.

tango12#
Yes and yes. 1. https://docs.hasura.io/1.0/graphql/manual/migrations/enable-...

2. For UUID just do what you would normally do. We don’t have it on the column drop down but you can create the table via the run_sql window with the right type and default value, if you’re generating the UUID server-side

Load more comments