1 個回答
- 最新
- 最多得票
- 最多評論
0
I thought of sharing my approach to this, I used a Global Secondary Key (GSI) in the CITY table so I could query the cities by country_code (see below). I then used pagination to gather the remaining cities since the API does not return more than 1MB of data. I really like this video from YouTube that explains the difference between Scan and Query for those that are just getting started.
type CITY @model {
id: ID!
country_code: String! @index(name: "byCountry", queryField: "listCitiesbyCountry")
name: String!
code: String!
state: String
...
}
已回答 1 年前
相關內容
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前