Comments (6)
@pixelhandler So, as the author of the recent JSON API rewrite, this is rather embarrassing for me...
The fact is that the JSONAPISource is not yet compliant with JSON API. I originally wrote this source as a simple RESTSource, with no concept of primary and linked resources, and with the intention of developing a JSONAPISource separately. However, I grew uncomfortable with the implications of writing such a generic source without a spec to follow, and didn't want to support such a source indefinitely.
I'm planning to get back to this in the next few days, after straightening out some module issues, and before I write my JSON API example project. I'll take a peek at your blog too and might use it as a sanity check for the updated source.
from orbit.
I'll be developing my app against memory and localStorage sources meanwhile, knowing that plugging in new sources shouldn't be that hard following stds and predefined APIs. @dgeb if you need any help making JSONAPISource
more compliant I'm happy to help, will just need a little guidance at the beginning. Thanks for your work!
from orbit.
Question @dgeb: ember-data is highly compliant with JSON API, right? Meaning, if I've got an API working well with ember-data 1.0.0-beta.8 (latest), it is expected that a compliant JSON API Source would work well with it (and will significantly differ from current orbit's implementation)?
As always, thank you so much for your good work.
from orbit.
@tute I believe this is currently the most JSONAPI-compliant adapter for ember-data: https://github.com/daliwali/ember-json-api
It was recently updated by @stefanpenner to include tests and be more compliant.
from orbit.
@pixelhandler the underlying incompatibility with JSON API has been fixed in master.
I created pixelhandler/blog#3 to resolve the problem in your branch. You'll need to rebuild orbit and ember-orbit in order to get this working.
Note that JSON API now expects requests for singular resources (such as /posts/:slug
) to return singular objects not in arrays. This was a breaking change in the 1.0rc1 rewrite of JSON API. I left this broken, since I thought it would be better to fix your server response rather than customize the orbit serializer.
from orbit.
Awesome @dgeb looking forward to trying it out. Yeah I'll need to change the api as you mentioned. I'm on vacation this week so I'll give it a shot next week. Thanks for the PR!
from orbit.
Related Issues (20)
- Memory Cache won't update relationships' meta if identities match existing record HOT 6
- Enable GitHub discussions to move support requests/general questions out of issue queue HOT 2
- [Docs] Add technical description of key request-processing, sync components
- `JSONAPIURLBuilder::buildPageParam()` (and likely others) have undefined properties serialized as `undefined` in query param
- Improve Validation Errors
- Integration with AbortSignal HOT 1
- serializers customization HOT 1
- custom filter operations
- [Feature] AsyncStorage data source
- Allow filtering for attribute/relationship not `null` (negated condition)
- Add "sideEffects": false to Orbit packages HOT 3
- Need optional chaining in `MemoryCache::removeInverseRelationshipsSync()` HOT 4
- jsonapi parallel request HOT 1
- parallel data querying principes HOT 3
- There is no upgrading steps in documentation HOT 2
- JSONAPISource Serialization Problem
- Store `__inverseRels__` not cleaned up with transform option `{ useBuffer: true }` HOT 1
- Optimistic Error Handling Got TypeError Not NetworkError HOT 4
- "supportsIndexedDB" is malfunctioning in some cases
- Kalakyo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orbit.