Supabaseoli_riceAnnouncement
What's New in pg_graphql v1.2
Summary
pg_graphql v1.2 introduces several API features for projects using PostgreSQL 15.1.0.63 or higher, including reflection of views, materialized views, and foreign tables. Reflected views require a primary-key constraint supplied through a comment directive, while simple views also support insert and update mutation events. Filtering gains null and non-null checks plus like, ilike, and startsWith options; startsWith can use simple B-Tree indexes, while citext and PGroonga address scalability concerns for text filtering. The release adds functional @skip and @include directives and lets users define GraphQL descriptions for tables, views, and columns through comments. Planned work includes user-defined functions, nested inserts, and an alternative computed-relationships approach based on SQL functions returning SET OF.
Context
The release follows the 1.0.0 launch and aims to improve the APIs produced by pg_graphql. The described features are available only on projects with Postgres version 15.1.0.63 or higher.
Approach / What changed
The update expands schema reflection to views, materialized views, and foreign tables; uses comment directives for view primary keys and descriptions; adds null-aware and text-matching filters; and implements the GraphQL @skip and @include directives.
Takeaways
Views, materialized views, and foreign tables can be reflected in the GraphQL schema, but exposed entities require primary keys; views can receive the constraint through an @graphql comment directive.
StringFilter now supports like, ilike, and startsWith. startsWith is preferred where applicable because simple B-Tree indexes can improve its performance; citext and PGroonga address scalability concerns for expanded text filtering.
The release enables GraphQL @skip and @include directives and comment-based descriptions for tables, views, and columns, allowing GraphQL IDEs such as GraphiQL to render API documentation.
Source and freshness
- Source
- supabase.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.