[Vuejs]-Nuxtjs/apollo is there a way to make apollo wait on other requests before starting the query?

0👍

thanks to @xadm i was able to get this to work, i am gonna post the vuejs code i reached to do this same effect.

First in my data i should have a variable to skips the query so it won’t execute on load…

...
data () {
  return {
    blockQuery: true
  }
}

and then when i am defining my query i should pass that blockQuery to stop it from executing

apollo: {
  myDataQuery: {
    query: <the gql query>
    skip () {
      return this.blockQuery // this is true so the query wont execute on load
    }
  }
}

then i should make whatever third party request i need, for example…

async mounted () {
  const response = await <my request that resolves>
  // after i made my request i should change the blockQuery to false so it would start the query
  this.blockQuery = false // after this changes to false it will start the query.
}

Leave a comment