Skip to content

Instantly share code, notes, and snippets.

@robwormald
Last active January 2, 2016 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robwormald/8290914 to your computer and use it in GitHub Desktop.
Save robwormald/8290914 to your computer and use it in GitHub Desktop.
//timelog from server
{
id : 123,
employee : 456,
project : 789
}
//project from server
{
id : 789,
name : 'some project'
}
//employee from server
{
id : 456,
name : 'joe'
}
transform...
//timelog
{
id : 123,
employee : Employee.get(456), //this might fire 11ty times!!!
project : Project.get(789) //this might fire 11ty times!!!
}
/ideally -
{
id : 123,
employee : Employee.lazy(456), //dont fire yet
project : Project.lazy(789) //dont fire yet
}
in view
{{timelog.employee.name }} -> now fire the request (or preferably fetch object from local graph)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment