O
O
overus2019-12-26 15:06:46
Vue.js
overus, 2019-12-26 15:06:46

How to retry apollo request again based on conditions?

Good afternoon!
There is a request:

apollo : {
        someData : {
            query : () => someDataQuery,
            variables() {
                return {
                    id : this.id,
                };
            },
            result( data ) {
                if( data === 0 ) {} // повторить запрос еще раз, если data === 0
                console.log( data );
            },
            error( error ) {
                console.error( error );
            },
        },
    },

How to call (retry apollo request) while or if data === 0?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question