---
title: "What's New in pg_graphql v1.2"
description: "pg_graphql v1.1–1.2 now reflects views, materialized views and foreign tables into the GraphQL schema, with primary keys declared via a comment directive."
url: "https://swe.quest/articles/what-s-new-in-pg-graphql-v1-2-8e0869fac360da26"
canonical: "https://supabase.com/blog/whats-new-in-pg-graphql-v1-2"
source: "Supabase"
published: "2023-04-21"
difficulty: "medium"
kind: "Release"
reading_minutes: 4
tags: ["graphql","postgres","api-design"]
---

# What's New in pg\_graphql v1.2

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2023-04-21, 4 min read, Release. Original: [https://supabase.com/blog/whats-new-in-pg-graphql-v1-2](https://supabase.com/blog/whats-new-in-pg-graphql-v1-2)

## Summary

pg\_graphql v1.1–1.2 now reflects views, materialized views and foreign tables into the GraphQL schema, with primary keys declared via a comment directive. Simple views also support inserts and updates, which can keep older API shapes working while the underlying tables are migrated. Filtering gains \`is: NULL/NOT\_NULL\` on every scalar filter plus \`like\`, \`ilike\` and \`startsWith\` on strings; \`startsWith\` is preferred because it can use plain B-tree indexes. The release also implements the spec's \`@skip\`/\`@include\` directives and lets users set table and column descriptions through comment directives, and requires Postgres 15.1.0.63 or later.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [GraphQL](https://swe.quest/tags/graphql.md) (Backend & APIs)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)

## Prerequisites

- GraphQL basics ([easy posts on GraphQL](https://swe.quest/tags/graphql.md?difficulty=easy))
- PostgreSQL views ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))

## Keywords

pg\_graphql, Supabase, PGroonga, citext, GraphiQL

## Related posts

- [pg\_graphql: Postgres functions now supported](https://swe.quest/articles/pg-graphql-postgres-functions-now-supported-279553dc083ab4d8.md): Supabase · 2023-12-12 · Medium · 4 min read · GraphQL, PostgreSQL, API design
  pg\_graphql 1.4+ reflects Postgres user-defined functions into the GraphQL schema, giving custom SQL logic a GraphQL entry point.
- [How pg\_graphql works](https://swe.quest/articles/how-pg-graphql-works-70dff1dd9d5a0c27.md): Supabase · 2024-01-24 · Medium · 9 min read · GraphQL, PostgreSQL, Rust, Compilers
  pg\_graphql is a Rust-based Postgres extension that reflects the SQL schema as a GraphQL schema and serves queries through a \`graphql.resolve\` SQL function, with no separate server.
- [pg\_graphql: A GraphQL extension for PostgreSQL](https://swe.quest/articles/pg-graphql-a-graphql-extension-for-postgresql-3a34efbe6d730fc2.md): Supabase · 2021-12-03 · Medium · 4 min read · GraphQL, PostgreSQL, API design
  pg\_graphql is an open-source PostgreSQL extension, written in C and SQL, that reflects a GraphQL schema from existing tables and resolves queries entirely inside the database.
- [pg\_graphql 1.5.7: pagination and multi-tenancy support](https://swe.quest/articles/pg-graphql-1-5-7-pagination-and-multi-tenancy-support-559a18cac63b25ac.md): Supabase · 2024-08-15 · Medium · 2 min read · GraphQL, PostgreSQL, Multi-tenancy, Caching
  pg\_graphql 1.5.7 adds offset-based pagination alongside existing keyset pagination, per-role schema caching for schema-per-tenant multi-tenancy, and array filter operators.
- [pg\_graphql v1.0](https://swe.quest/articles/pg-graphql-v1-0-5a4770d60b17d945.md): Supabase · 2022-12-16 · Medium · 5 min read · GraphQL, PostgreSQL, Rust, Performance engineering
  pg\_graphql, a PostgreSQL extension that compiles GraphQL requests into a single SQL query, reaches 1.0 with a SemVer backwards-compatibility guarantee.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
