How to request query from AWS Amplify with condition(Android Kotlin)?

0

I have a question about use of conditionally requesting AWS Amplify queries.
In the Amplify sample codes, I had to request every queries in database and add them to other array with condition(ex. owner == userId) to use it.

fun queryNotes() {
        Log.i(TAG, "Querying notes")

        Amplify.API.query(
            ModelQuery.list(NoteData::class.java),
            { response ->
                Log.i(TAG, "Queried")
                Log.i(TAG, response.toString())
                for (noteData in response.data) {
                    Log.i(TAG, noteData.name)
                    // TODO should add all the notes at once instead of one by one (each add triggers a UI refresh)
                    UserData.addNote(UserData.Note.from(noteData))
                }
            },
            { error -> Log.e(TAG, "Query failure", error) }
        )
    }

However, if there are lots of queries(over than hundred thousands), i expected that it would cause low service quality such as low speed or excessive use of Amplify server resources.
I want to know whether my expectation is right or wrong.
If it is wrong, I want to know why it is wrong.
If it is right, I want to know how to solve it such as giving condition on the requesting step or setting request condition on the Amplify studio.

回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ