HNHacker News
TopNewBestAskShowJobs

oliverrice

528 karma · joined August 15, 2019

submissionscomments
oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
PostgREST does solves a few of the core challenges that GraphQL is intended to address like over/under-selection and resource embedding (relationships).

Even so, there has still been a lot of interest in GraphQL so users can leverage the growing ecosystem for things reflecting the data model/types for client usage, offline caching, etc

oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
There is high level public roadmap that covers the minimum features required before we'd consider going GA here:

https://supabase.github.io/pg_graphql/roadmap/

Its early days, so the conversations around aggregates haven't happened yet, but I'm optimistic that they'll make an appearance in a future release

oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
Very cool! I was not familiar with this project. It does takes a similar approach to query building. It is described in the README as an alpha POC
oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
Apache Age is based around the openCypher graph query language rather than GraphQL
oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
sure, if we're talking free-tier:

Postgres runs in a 1 GB VM all by itself with some optimizations to get the most that limited hardware

All other services are in a second 1 GB VM.

You can see a list of those services here https://github.com/supabase/supabase/blob/master/docker/dock...

The memory use per process can differs by use-case, so its important to leave a bit of headroom. For example, PostgREST's memory consumption can grow if the amount of data being returned from its queries is large.

By the time you include:

- supabase studio

- kong

- auth

- storage

- meta

if they each take only 100MB, its pretty snug on a 1 GB VM!

oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
We don't have an apples-to-apples comparison for similar hardware and queries at this point but here are the links to performance figures for pg_graphql and grahile. Hasura does not publish throughput number afaik

pg_graphql: https://supabase.github.io/pg_graphql/performance/

graphile: https://www.graphile.org/postgraphile/performance/

We'll certainly be keeping an eye on performance as it gets closer to GA

oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
its very similar in goals to postgraphile

as samwillis mentioned, the memory footprint is tiny, which is a big perk for supabase's platform (or if you're self hosting) but its also fully language agnostic which opens up lots of options for extensibility:

For simple use-cases you can expose the graphql functionality over http using a PostgREST as described here https://supabase.github.io/pg_graphql/quickstart/

but, if you want more configuration like adding in middleware or wiring it up to an existing backend application, you can do that from any programming language that can connect to postgres, rather than only javascript

oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
The extension is compatible with your existing row level security policies. If you connect to the database as a role like `authenticated` then those policies will be applied.

The columns and tables that are visible are also controlled by the role.

One cool thing about that approach is you could run e.g. an admin API and a user facing API all from that same endpoint by executing as different postgres roles!

oliverrice··on Pg_GraphQL: A GraphQL Extension for PostgreSQL
author here! happy to answer questions
oliverrice··on Realtime Postgres Row Level Security
> does this also work for tables where the GRANT hides certain columns from different users?

Yes, it does! Any columns that are not selectable by the user's role are hidden from the JSON `response` and `old_response` keys and are not allowed for user defined filtered.

Here is where the columns are checked to see if they are selectable https://github.com/supabase/walrus/blob/f030688d9d94520b916d...

And here is there they are filtered out https://github.com/supabase/walrus/blob/f030688d9d94520b916d...

oliverrice··on Nebulo: Python Library and CLI for Reflecting GraphQL APIs from PostgreSQL
If someone could send me an invite to lobste.rs so I can post there too I'd appreciate it! My email address can be found here https://github.com/olirice/nebulo/blob/ee16a6acbf91652ae84ea...
oliverrice··on Nebulo: Python Library and CLI for Reflecting GraphQL APIs from PostgreSQL
Author here!

Nebulo is very much a work-in-progress, but its reached proof-of-concept viability so I'd love to hear what the community thinks!

At the moment, the motivation for the CLI is mostly to give quick feedback to people who want to try out the project. I'm curious if anyone has a use-case the CLI running a production ready web server?

In the short-term I expect to focus query safety and the last remaining elements of the relay connection spec (reverse pagination) that aren't implemented yet. https://relay.dev/graphql/connections.htm

Please feel free to raise any killer feature ideas in the comments

Contributors wanted!

Shutout to a few related projects written in other languages that inspired development of Nebulo (via envy):

JS: https://www.graphile.org/ Haskell: https://hasura.io/ Clojure: https://github.com/graphqlize/graphqlize lmk if I missed one

← PreviousPage 3 of 3