Sign up for Hasura Newsletter
Loading...

尝试关系查询

我们来探索一下已创建的关系的 GraphQL API。

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

你可以看到以下格式的响应:

关系查询

如你所见,在同一个响应中,你会获得用户信息的结果,与你查询的结果完全一致。 这是一个一对一查询/对象关系的示例。

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