Skip to content

Commit aee18b7

Browse files
author
Guillaume Chau
committed
If query is a function, call it in prefetchAll - fix #153
1 parent c8ab8db commit aee18b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/apollo-provider.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ export class ApolloProvider {
145145
}
146146

147147
// Query
148+
if (typeof queryOptions.query === 'function') {
149+
queryOptions.query = queryOptions.query(context)
150+
}
148151
return new Promise((resolve, reject) => {
149152
const options = omit(queryOptions, [
150153
...VUE_APOLLO_QUERY_KEYWORDS,

0 commit comments

Comments
 (0)