Closed
Description
I'm creating listing with load more option. On server side I'm loading first 12 results of query and on client side I want to add values from "load more" to server side result.
On server side I haven't access to "this" so i don't now how assign to result of server side and client side to the same variable 👎
Here is my query:
apollo: {
searchProperties: {
query: PROPERTY_LISTING_SEARCH,
prefetch: (route) => {
return {
searchFilters: {
type: 'FLAT',
transaction: 'SALE',
dictionaries: []
},
numberOfResults: 12,
pageNumber: 1,
searchOrder: {
sortKey: "RANK",
sortOrder: "ASC"
},
}
},
variables () {
return {
searchFilters: this.searchFilters,
numberOfResults: this.pagination.elementsPerPage,
pageNumber: 1,
searchOrder: {
sortKey: this.sort.sortKey,
sortOrder: this.sort.sortOrder,
},
};
},
result(data) {
if(process.client) {
console.log(data.data.searchProperties)
}
this.loading = data.loading;
if (!this.viewLoaded) {
this.viewLoaded = true;
}
}
},
},
Metadata
Metadata
Assignees
Labels
No labels