Skip to content

Instantly share code, notes, and snippets.

@jhusain
Created April 18, 2018 21:46
Show Gist options
  • Save jhusain/e1e01e562cb624ebe33a8f6733e713cd to your computer and use it in GitHub Desktop.
Save jhusain/e1e01e562cb624ebe33a8f6733e713cd to your computer and use it in GitHub Desktop.
falcor stuff
https://github.com/Netflix/falcor-path-utils/blob/master/lib/toTree.js
[
["list",{from:0,to:9],["name","rating"]],
["list", "length"]
]
->
{
list: {
0: {
name: null,
rating: null
},
...
9: {
name: null,
rating: null
},
length: 10
}
}
{
documentsByGuid: {
"LK234OSDLKFD": {
title: "Tipe is a CMS",
body: "...",
author: { $type: "ref", value: ["authorsByGuid", "AKFKDLSL23423"]}
}
}
authorsByGuid: {
"AKFKDLSL23423": {
name: "Jafar Husain"
}
}
}
<entity>ByGuid[<guid>].field
documentsByGuid[{keys}]['author','title','body']
authorsByGuid[{keys}]['name']
{
documentsByGuid: {
"LK234OSDLKFD": {
author: { $type: "ref", value: ["authorsByGuid", "AKFKDLSL23423"]}
}
}
authorsByGuid: {
"AKFKDLSL23423": {
name: "Jafar Husain"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment