Download tutorial as e-book ⚡️

Try out Relationship Queries

Let's explore the GraphQL APIs for the relationship created.

query {
todos {
id
title
user {
id
name
}
}
}

You can see the response in the following format:

relationship query

As you can see, in the same response, you are getting the results for the user's information, exactly like you queried. This is an example of a one-to-one query/object relationship.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2021 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin