Slide 7
Slide 7 text
Falcor:
Access as the JSON way
import { Model } from "falcor";
import { dataSource } from "./dataSource";
import assert from "assert";
new Model({
source: dataSource,
}).get(
"article['123']['id', 'title']", "article['123'].author['id', 'name']"
).subscribe(response => {
assert.deepEqual(response.json, {
article: {
"123": {
id: "123", title: "graph api",
author: {
id: "u0001",
name: "quramy"
}
}
}
});
});