Create Relationship

Now that the foreign key constraint is created, Hasura Console automatically suggests relationships based on that.

Head over to Relationships tab under todos table and you should see a suggested relationship like below:

Todos Relationships Page

Click on Add in the suggested object relationship.

Enter the relationship name as user (already pre-filled) and click on Save.

User Object Relationship

A relationship has now been established between todos and users table.


Get Started with GraphQL Now

Hasura Cloud gives you a fully managed, production ready GraphQL API as a service to help you build modern apps faster.
Ready to get started?
Start for free on Hasura Cloud or you could contact our sales team for a detailed walk-through on how Hasura may benefit your business.
Stay in the know
Sign up for full access to our community highlights, new features, and occasional baby animal gifs! Oh, and we have a strict no-spam rule. โœŒ๏ธ