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.

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠