Let say i have the Todo adapter and override the buildURL and added the query params for the this model.
Eg:
/adapters/todo.js
buildURL(modelName, id, snapshot, requestType, query) {
let scope = 'active';
switch (requestType) {
case 'query':
case 'queryRecord':
url = this._super(modelName, id, snapshot, requestType, query);
break;
default:
url = this._super(...arguments);
url = key ? `${url}?scope=${key}` : url;
}
return url;
}
Now in the todo model, i have a member action which is like:
removeTag: memberAction({
path: 'tags',
type: 'delete'
})
so once calling the removeTag method, the url is created like:
http://localhost:3000/todos?scope='active'/tags