pg_graphql
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_graphql | 1.6.1 | FEAT | Apache-2.0 | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2740 | pg_graphql | No | Yes | No | Yes | No | No | graphql |
not an official release by Vonng.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.6.1 | 1817161514 | pg_graphql | - |
| RPM | PIGSTY | 1.6.1 | 1817161514 | pg_graphql_$v | - |
| DEB | PIGSTY | 1.6.1 | 1817161514 | postgresql-$v-pg-graphql | - |
Build
You can build the RPM / DEB packages for pg_graphql using pig build:
Install
You can install pg_graphql directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources: README, documentation, v1.6.1 release
pg_graphql reflects a GraphQL schema from your existing SQL schema, enabling GraphQL queries directly inside PostgreSQL without additional servers or middleware.
Schema Reflection
Tables, foreign keys, and enums are automatically mapped to GraphQL types:
This schema automatically generates GraphQL types (Account, Blog, BlogPost) with relationships derived from foreign keys.
Name Inflection
Enable automatic snake_case to camelCase/PascalCase conversion:
Querying
Execute a GraphQL query via the graphql.resolve function:
Features
- Table queries appear as pageable collections on the root
Querytype - Foreign key relationships create nested query fields automatically
- Mutations support bulk insert, update, and delete
- Filtering, ordering, and pagination are built in
- PostgreSQL Row-Level Security (RLS) policies are respected
Version Notes
pg_graphql 1.6.1 fixes double NON_NULL wrapping in byPk argument types that could break GraphiQL introspection, fixes mixed introspection/data queries returning partial results incorrectly, and updates documentation around introspection opt-in notices.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)