Hacker News new | ask | show | jobs
by oliverrice 1550 days ago
heyo, thanks for the ping

I'm the dev lead on pg_graphql. Happy to answer any questions!

3 comments

Excellent work!

Postgraphile uses a naming convention for postgres functions to extend the GraphQL schema [1].

Do you have any plans to support a similar mechanism in pg_graphql?

[1]: https://www.graphile.org/postgraphile/functions/

Thanks!

Yes, we currently support extending table types via functions using a naming convention. The docs for that feature are available here https://supabase.github.io/pg_graphql/computed_fields/#exten...

It's also on the near-term roadmap to implement custom mutations from user defined functions, similar to postgraphile

Excellent - thanks!
It's impressive that the entire thing is in pl/pgsql (apart from parsing).

Have you considered any other implementation strategies (C native extension, any other pl/* or maybe running an out of PostgreSQL process which does GraphQL to SQL compilation)?

Yes! We've been exploring https://github.com/tcdi/pgx internally so we'd be able to re-work the hotspots in rust.

We haven't decided to go that route yet but its been incredibly easy to work with & I'm psyched about what options it could open up like:

- Stateless requests (no schema cache)

- Subscriptions (via a background worker)

Any plans to expose RPC functions inside of GraphQL?
Yes, its on the roadmap to implement custom mutations reflected from user defined functions