cardstack / ember-data-fastboot

Serializes and restores the ember-data store for fastboot
MIT License
52 stars 24 forks source link

Add support to non-jsonapi serializers #7

Closed josemarluedke closed 3 years ago

josemarluedke commented 7 years ago

This PR makes possible to serialize and push model data using its serializer, allowing us to not require JSONAPI serializer.

I'm sure the code could be refactored to make things more clear. Please let me know what should I change to make this land.

Also, I did not wanted to follow the idea from #4 of having a custom serializer because ember data is deprecating store.serialize and I wasn't sure if that deprecation would apply to the approach of #4.

This closes #3.

rondale-sc commented 7 years ago

@josemarluedke I'm getting an error that _ isn't defined when it tries to pull in the records. Is it that lodash isn't required by this addon or something?

josemarluedke commented 7 years ago

Ahhh, that's true. I got this from our app witch has lodash. I will update this PR to not require it.

rondale-sc commented 7 years ago

@josemarluedke was able to fix with: let recordsToPush = $.extend({}, dump.records)[modelName]; Which should be functionally the same.

josemarluedke commented 7 years ago

@rondale-sc updated removing the usage of lodash. This should be ready for a review/testing/merging.

CvX commented 7 years ago

This PR got a little stale, here's an updated version: https://github.com/CvX/ember-data-fastboot/tree/not-only-jsonapi-updated (a rebase of @josemarluedke's work).

medokin commented 7 years ago

Patiently waiting for this to become ready.

adentranter commented 6 years ago

Are the people not using JSONAPI using this commit?

Is this going to be merged in at anytime?

What are you guys using currently for ember fastboot data?

Cheers

medokin commented 6 years ago

@adentranter We are using https://github.com/Appchance/ember-cached-shoe It works fine with our custom RESTAdapter.

adentranter commented 6 years ago

@medokin legend. Going to look into that tonight :)