supabase look like so helpful tool. which has anyone use in production? does it have a hasura like event trigger mechanism?
Event triggers are the mechanism pg_graphql uses to keep the GraphQL schema up-to-date with the SQL schema
51–60 of 102 posts
supabase look like so helpful tool. which has anyone use in production? does it have a hasura like event trigger mechanism?
Event triggers are the mechanism pg_graphql uses to keep the GraphQL schema up-to-date with the SQL schema
This is awesome! Really creative approach to the problem. Does this also support custom datatypes that can be marshalled to json? For example, PostGIS geometries?
Currently, any datatypes that are not in the allow list https://supabase.github.io/pg_graphql/reflection/#type-conve... are cast as strings, but prioritizing a JSON conversion if one is available is a great idea that we'll look into
https://www.postgresql.org/docs/current/sql-createcast.html
There are some weird permissions issues to work out IIRC, but this allows the user to specify how the json should be marshalled, and then can be implicitly or explicitly used by any sql statements. This is how PostgREST solves this problem, and I currently have a few custom casts created for range and multirange datatypes through my PostgREST server.
author here! happy to answer questions
This is awesome! Really creative approach to the problem. Does this also support custom datatypes that can be marshalled to json? For example, PostGIS geometries?
Currently, any datatypes that are not in the allow list https://supabase.github.io/pg_graphql/reflection/#type-conve... are cast as strings, but prioritizing a JSON conversion if one is available is a great idea that we'll look into
Curious how it compares to https://www.graphile.org/postgraphile/
That reminds me, I need to figure out how to get my employer to sponsor the project...
As co-founder of another database company in the PostgreSQL ecosystem, I have to say that I'm really impressed with the quality and velocity of launches from the Supabase team. Nothing else to add, except please keep up the great work!
What's your company?
That’s interesting. How does it deal with authentication and authorization? It it handles those well, it could be a real “serverless” solution for most CRUD apps.
As the sibling comments point out, it uses Postgres Row Level Security (RLS). For an approachable introduction to how Supabase's auth works: https://supabase.com/docs/guides/auth > 1. A user signs up. Supabase creates a new user in the auth.users table. > 2. Supabase returns a new JWT, which contains the user's UUID. > 3. Every request to your database also sends the JWT. > 4. Postgres inspects the JWT to determine t…
Earlier quoted context omitted.
Hey it's unrelated but, what's the relationship between Supabase and Postgrest? My understanding is that Postgrest is a separate project that began development in an unrelated way to Supabase, and Supabase is just an user. Is that correct? But, Supabase is also a contributor to Postgrest, right? Does Supabase employs engineers dedicated to it?
> What's the relationship between Supabase and Postgrest? Supabase uses PostgREST for its automatic/reflected REST API > Supabase is just an user. Is that correct? yep! > Does Supabase employs engineers dedicated to it? https://supabase.com/blog/2020/06/15/supabase-steve-chavez
> Great to see AWS providing direct data coupling as a service. /s
> This service allows you to directly map a GraphQL endpoint to a database table. It’s like putting getters and setters on an object and claiming your encapsulating private variables. The end result is coupling between GraphQL clients and the underlying datasource.
> Information hiding is a key concept in independent change. Can I change the provider (of the GraphQL) endpoint independent of the clients? Directly exposing internal data structure makes this very difficult.
And [2]:
> So a few people have asked why I have this snarky response. What is my problem with this service? Well, to be clear, it’s not an issue with GraphQL, it’s an issue with direct coupling with underlying datasources #thread
> The service as advertised makes it simple to map a GraphQL definition against a database. Now, what’s the problem with this? Well, the devil here is in the detail. But fundamentally it comes down to how important information hiding is to you.
> ... see the thread for more ...
[1] https://twitter.com/samnewman/status/1346541251617828877 [2] https://twitter.com/samnewman/status/1346749556583780352
author here! happy to answer questions