Sign up for Hasura Newsletter
Loading...

リレーションシップクエリを試す

作成されたリレーションシップ用のGraphQL APIを見ていきましょう。

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

以下の形式で応答を確認できます。

リレーションシップ

ご覧の通り、同じ応答でクエリしたとおりにユーザー情報の結果が得られます。これは、1対1のクエリ/オブジェクトリレーションシップの一例です。

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
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin