-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Overhaul store.push and store.pushPayload #161
Conversation
@@ -294,7 +294,11 @@ use cases are supported with this. | |||
introduces those type of reference to the public | |||
([`store.getReference`](http://emberjs.com/api/data/classes/DS.Store.html#method_getReference) | |||
is not really helpful at the moment). It is questionable if returning | |||
references is needed here. Since we have a `store.normalizePayload` now, it is | |||
references is needed here and in general, if references are intented for this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/intented/intended/
I started working on a proof of concept https://github.com/pangratz/ember-data-store-push-improvements |
Our team would love to see this landed. We have our backend api as a thrift server and we use Ember Data in the frontend. Basically we had to create some random conversions from our api response to JSON API format. Having something like this would help us organize our code and most importantly, test it easily with patterns in place. ❤️ |
Nice writeup and thanks for tackling this! 🏆 Some thoughts:
|
Hey @sandstrom, thanks for your feedback. I've updated the RFC so there is a I am not too convinced about the additional parameter, as this would return a different type for the method, depending on the passed in function. One could argue, that this is already the case since |
@pangratz sounds great! I agree that an additional parameter (3) has some drawbacks. I was mainly trying to figure out was of keeping the API surface down. What do you think about using 3.0 to reduce the number of normalization methods on the store? But this isn't a major thing, overall I'm very much in favour of this proposal! |
We should definitely make sure the normalization story is better in the future and tidy that up with |
I think we ultimately want to deprecate After todays ember-data core team meeting we moving this into "FCP to close". |
normalizePayload doesn't even exist anymore :) |
Rendered