Netflix / falcor

A JavaScript library for efficient data fetching

Home Page:http://netflix.github.io/falcor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Best practices to fetch all referenced data

jakub-bogacz opened this issue · comments

Hello,
I'm trying to find best solution for fetching whole referenced data.

We've got following "database" structure:

{
  genresById: {
    1: {
      name: "Crime",
      titles: [
        $ref('titlesById[1]'),
        $ref('titlesById[3]')
      ]
    },
  },
  titlesById: {
    1: {
      name: "Godfather"
    },
    2: {
      name: "La vita è bella"
    },
    3: {
      name: "Pulp Fiction"
    },
    4: {
      name: "Intouchables"
    }
  }
}

What is the best way to fetch