apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Disable default watcher loading if one is specified in query

Open yaki4 opened this issue 6 years ago • 2 comments

What problem does this feature solve?

If i use a watcher loading in my apollo config, this watcher is called every time i made a query. It's great if i want to work the same way every time, but if i've got one query where i want to manage the loading anothre way it doesn't work.

apollo: { watchLoading: '~/plugins/apollo-watch-loading-handler.js', clientConfigs: { default: '~/apollo/client-configs/default.js' }, includeNodeModules: true },

query example : dataSpecific: { query: require('@/apollo/queries/dataSpecificQuery'), variables () { return { ids: XXXX } }, update (data) { return data }, watchLoading (isLoading) { console.log("i'm the only one who works') } }

This feature request is available on Nuxt community (#c294)

yaki4 avatar Feb 17 '20 21:02 yaki4

This module using the default config from vue-apollo. As my understanding, is the single smartQuery watchLoading also run for another query?

Because this module is a simple embed of vue-apollo, so it should work as same as the original.

kieusonlam avatar Feb 18 '20 02:02 kieusonlam

both run when a smartQuery is executed. I'll open an issue on the original module. Thanks for your quick response.

yaki4 avatar Feb 18 '20 14:02 yaki4