fix: $query wasn't merged, closes #638
This commit is contained in:
@@ -90,12 +90,15 @@ export class DollarApollo {
|
||||
const apollo = this.vm.$options.apollo
|
||||
const defaultOptions = this.provider.defaultOptions
|
||||
let $query
|
||||
if (apollo && apollo.$query) {
|
||||
$query = apollo.$query
|
||||
}
|
||||
if ((!apollo || !apollo.$query) && defaultOptions && defaultOptions.$query) {
|
||||
if (defaultOptions && defaultOptions.$query) {
|
||||
$query = defaultOptions.$query
|
||||
}
|
||||
if (apollo && apollo.$query) {
|
||||
$query = {
|
||||
...$query || {},
|
||||
...apollo.$query,
|
||||
}
|
||||
}
|
||||
if ($query) {
|
||||
// Also replaces 'undefined' values
|
||||
for (const key in $query) {
|
||||
|
||||
Reference in New Issue
Block a user