Using this technique allows you to build up the query collection as you want it to be:
// content of model(params)
let hash = {};
let uid = params.user;
if (uid) {
hash.user = uid;
}
return this.store.query(‘workspace’, hash);
Demoing code from a phone… !