假設一個GraphQL架構支持以下查詢:創作GraphQL查詢
{
person(id: String) {
locationId
}
}
和
{
location(id: String) {
country
}
}
是否有可能找到一個person
通過id
,然後利用產生的locationid
找到自己location
通過id
(返回與location
相對應的country
)全部在單個查詢中?或者我會不得不做兩個單獨的查詢?