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.