DEV Community

Discussion on: Data Modeling in Depth with GraphQL & AWS Amplify - 17 Data Access Patterns

Collapse
dabit3 profile image
Nader Dabit Author

So either can be used, but the query on index is preferred because a filter with scan will scan the entire database and then discard the items based on the filter, while the query will only query the items needed so the operation is less expensive in general.