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.

Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas