GraphQL schema on Postgres with foreign keys and without foreign keys
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
Hacker News points
None found.
Language
English