-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSHttpAdapter#find/create/update/destroy do not call queryTransform #313
Comments
I seem to still be having this problem. In my config block I've defined a DSHttpAdapterProvider.defaults.deserialize = (resourceName, data) => {
console.log(resourceName, data)
return data ? ('data' in data ? data.data : data) : data;
}
DSHttpAdapterProvider.defaults.queryTransform = (params) => {
console.log(params, 'transform')
return params
} |
The signature for As you can see here Could you possibly create a jsfiddle, plunker or jsbin that demonstrates the issue? What version of js-data are you using? Are you using any other js-data libraries? |
Ah I found the problem. |
Ah, that's because a generated action uses |
Wouldn't it be better if they did? Unless there's another way, new actions can't get transformed and also return a full structure instead of the data since deserialize is also not called. |
I tend to agree, though at this point I'm not sure that if add |
Per discussion at https://groups.io/org/groupsio/jsdata/thread/40098 it's expected that
DS#find
will run the (optionally) passedparams
object throughDSHttpAdapterProvider.defaults.queryTransform
like howDS#findAll
does. Currently this does not happen.The text was updated successfully, but these errors were encountered: