/plushcap/analysis/hasura/postgres-json-and-jsonb-type-support-on-graphql-41f586e47536

Postgres JSON and JSONB type support on GraphQL

What's this blog post about?

Postgres supports storing schema-less (NoSQL) data as JSON columns through dedicated hstore, JSON or JSONB column types. Even though type safety is a major push for moving to GraphQL, there are real-world use-cases where you’d still need some columns which can store data for which schema is not decided already. For example, an analytics system that logs events from various sources and an e-commerce website’s database where each product has a strict set of basic parameters, but a varying range of specifications (or specs). Hasura GraphQL Engine supports JSON/JSONB columns and also provides support for JSONB Boolean operators. It allows inserting arbitrary JSON into the table using mutations and supports Postgres JSONB operators like _append, _prepend, _delete_key, _delete_elem, and _delete_at_path. Additionally, views can be created to further inspect the contents of the column which can be queried through GraphQL as well.

Company
Hasura

Date published
Aug. 10, 2018

Author(s)
Shahidh K Muhammed

Word count
891

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.