-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
@bobholt @tkellen @cowboy @leobalter What is your reaction to the idea of defining the include parameter on the adapter? I was thinking it would end up looking something like this.
// app/adapters/post.js
import EndpointsAdapter from "ember-data-endpoints/adapter";
export default EndpointsAdapter.extend({
queryParams: {
include: ['author', 'comments', 'comments.author'].join(',')
}
});Then any time you would need to do a get GET request the adapter's queryParams object would be serialized into the url. For example store.find('post') would request GET /posts?include=author,comments,comments.author and store.find('post', 1) would request GET /posts/1?include=author,comments,comments.author.
I think in the cases where doing a store.find('post', {include: 'foo'}) the include: 'foo' would take priority over the the include defined on the queryParams object.
Open question. Should the queryParams be included in the url for non get requests?
Metadata
Metadata
Assignees
Labels
No labels