[Vuejs]-What to do if the data does not reach?

0👍

You can try and log your data via fetch.

export default {

data(){
    return {
        mydata: [],
        query: ''
    }
},
fetch() {
    console.log(this);
    console.log(this.users);
  },
}

https://nuxtjs.org/blog/understanding-how-fetch-works-in-nuxt-2-12/

I’m sure there is another way to log data/data changes by using watchLoading/errorHandler in your apollo module setup but I could not get it to function – so I am using fetch.

https://github.com/nuxt-community/apollo-module

Leave a comment