Show HN: GraphQL for Postgres
github.com
github.com
I understand this is alpha / proof-of-concept, and this is in no way meant as criticism, also not specific to this implementation, but just trying to figure out something:
What's the security model for GraphQL (at least as intended for javascript clients speaking to a backend)? Can we just pass the GraphQL from the client to the server and execute it? (In this case, directly on the PG database). What kind of security can be built around this?
But since the idea of GraphQL handles so much from the logic standpoint, your programming layer can just act as a gatekeeper for access.
That said, Postgres is pretty powerful. Maybe there is an elegant way to do row-level access control.
I started a very naive implementation of A-Relay-Like-Architecture (Arla) and built todomvc with it[1].... schema.js[2] declares the schema/nodes as well as the 'calls/edges' available for each node, which allows you to limit the visible rows/columns based on the $viewer id.
It's all a bit of an experiment... but I'm liking the GraphQL pattern so far.
[1] https://github.com/kiloe/arla-todomvc [2] https://github.com/kiloe/arla-todomvc/blob/master/schema.js
Ah yes, definitely the Jason I know. ;)
Great work!
But the lack of updates for json/jsonb data remains a problem. It's really the only significant problem left for using Postgres for almost-everything, but it's a real issue.
Unless you are underage, in which case that's too bad
Though iirc Jason doesn't drink. You might need to buy him coffee instead!
I think a v2 release should really be in PLV8. PL/SQL is already there and is probably pretty performant; but it doesn't feel like the best option either from the standpoint of maintainability or community contributions.
https://facebook.github.io/react/blog/2015/02/20/introducing...