news.volyx.in

Pg_GraphQL: A GraphQL Extension for PostgreSQL (supabase.com)

431 points by samwillis · 1752 days ago · 99 comments on HN

Article summary

The article introduces pg_graphql, a native PostgreSQL extension that adds GraphQL support, allowing for performant and up-to-date queries without requiring external services. The extension inspects an existing PostgreSQL schema and reflects a GraphQL schema with resolvers. It is designed to be lightweight and compatible with existing row level security policies. The article also discusses the motivation behind creating pg_graphql, including the need for a SQL-centric GraphQL solution that can run on limited resources.

Main themes

  • pg_graphql
  • GraphQL
  • PostgreSQL
  • database extensions
  • performance optimization
  • security policies
  • offline-sync support
  • database compatibility
  • search and sort functionality
  • comparison to existing solutions
  • feature requests and roadmaps
  • adoption and migration considerations

What commenters say

  • Some commenters compared pg_graphql to existing solutions like Hasura and Graphile, noting similarities and differences in features and performance.
  • The memory footprint of pg_graphql is seen as a significant advantage, particularly for resource-constrained environments.
  • There are discussions about the potential for pg_graphql to support advanced features like custom directives, custom routes, and schema injection.
  • Some users expressed interest in offline-sync support and local mirroring systems for mobile apps and PWAs.
  • The compatibility of pg_graphql with other databases like TimescaleDB, YugabyteDB, and CockroachDB is questioned, with some commenters noting that it has not been tested.
  • The implementation of search and sort functionality in pg_graphql is also discussed.
  • Some commenters noted that while pg_graphql shows promise, it would take significant advantages to switch from existing solutions like Hasura.