hasura / learn-graphql

Real world GraphQL tutorials for frontend developers with deadlines!
https://hasura.io/learn/
MIT License
1.18k stars 650 forks source link

Foreign Key Relationships #949

Closed tbarnes closed 1 year ago

tbarnes commented 1 year ago

Description

Nothing about linking the tables in Hasura before attempting to query against the relationship. The query won't automatically populate without the FK relationship set.

Solution and Design

Add a bit of detail about building this relationship and a screenshot of the Hasura UI.

praveenweb commented 1 year ago

Hi, @tbarnes - Thanks for the PR.

The tutorial has a page about creating a foreign key constraint here

The page you refer to has a note at the end that the queries won't work without the foreign key constraints. We were trying to introduce the concept of Relationships before getting into the logistics of creating one.

I'm closing this one.