feat(ApolloQuery): prefetch prop, closes #594

This commit is contained in:
Guillaume Chau
2019-05-02 15:45:01 +02:00
parent 4d4cdab23e
commit 8bd5d8d187
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -14,6 +14,7 @@
- `tag`: String HTML tag name (default: `div`); if falsy (for example `null` or `undefined`), the component will be renderless (the content won't be wrapped in a tag), in this case, only the first child will be rendered
- `debounce`: Number of milliseconds for debouncing refetches (for example when the variables are changed)
- `throttle`: Number of milliseconds for throttling refetches (for example when the variables are changed)
- `prefetch`: If `false`, will skip prefetching during SSR
## Scoped slot
+6
View File
@@ -72,6 +72,11 @@ export default {
type: String,
default: 'div',
},
prefetch: {
type: Boolean,
default: true,
},
},
data () {
@@ -123,6 +128,7 @@ export default {
context () { return this.context },
skip () { return this.skip },
deep: this.deep,
prefetch: this.prefetch,
manual: true,
result (result) {
const { errors, loading, networkStatus } = result