can-connect
can-connect copied to clipboard
Support data transformations in the client that the server doesn't support.
trafficstars
Say someone wants to make a request like:
Message.getList({
sort: "lastName asc",
where: {
first: "Joe"
}
})
But sort and where aren't supported yet by the server. The server might only be able to return an unfiltered and unsorted list -> Message.getList({}).
It would be nice if we could somehow indicate some clauses or behaviors that are client-only. In this example, the unfiltered and unsorted list would be filtered and sorted in the client.
This will allow clients to perform grid-like experiences using can-set's ability to do pagination, sorting, filtering, etc.
This would probably need to work in conjunction with cache-requests and have some sort of configuration, telling the behavior which param properties should be removed and applied after the data came back.