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公式更新しました 2年前
- AWS公式更新しました 2年前