/plushcap/analysis/hasura/graphql-schema-on-postgres-with-foreign-keys-and-without-foreign-keys-95f6b2715478

GraphQL schema on Postgres with foreign keys and without foreign keys

What's this blog post about?

The Hasura GraphQL Engine allows for modeling a graph using a relational database system like Postgres. It supports creating relationships between tables (nodes) using single-column foreign keys, multi-column foreign keys, or even without foreign keys. In the case of single-column foreign keys, Hasura's console suggests relationships over these columns and derives a GraphQL schema containing relation names for querying both tables in a single query. Relationships can also be created manually without a constraint, allowing for more flexibility when defining relations between tables. This enables GraphQL queries over extra information not necessarily constrained by foreign keys.

Company
Hasura

Date published
Aug. 16, 2018

Author(s)
Shahidh K Muhammed

Word count
515

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.