apollo icon indicating copy to clipboard operation
apollo copied to clipboard

SmartQuery error() only called once

Open szokeptr opened this issue 3 years ago • 0 comments

Describe the bug The error handler of the smart queries is being called only once. After a remount, only update() is called.

To Reproduce My query options:

apollo: {
        queryData: {
            query: MY_QUERY,
            variables() {
                const {username, platform} = this.account
                return {username, platform};
            },
            update(data) {
                console.log('Update()', data);
                return data;
            },
            result() {
                console.log('Result()')
            },
            error(error) {
                console.log('Error()', error);
            }
        }
    },

Expected behavior I expect error() to be called even when the results are fetched from the cache.

Versions vue: 2.6.11 vue-apollo: 3.0.5 apollo-client: 2.6.10

Additional context errorPolicy is set to all.

szokeptr avatar Jan 25 '21 13:01 szokeptr