News for hackers. Stuff that matters.
Re:Airbnb Is Moving Faster at Scale with GraphQL and Apollo by aboutruby on Saturday January 12, 2019 @08:57PM (#18894544)
In my cases, for 1) and 2) the parent component would be fetching the user and passing it down to the child components.
Re:Airbnb Is Moving Faster at Scale with GraphQL and Apollo by exogen on Saturday January 12, 2019 @09:06PM (#18894590)
For (1), how does the parent know whether those components will actually be rendered? Keep in mind one of the requirements was "only fetch if they're actually rendered." Presumably some other components along the way could be deciding to conditionally render them, right?

For (2), the complexity is still there, just in the parent: it needs an entity store and to merge/invalidate when the same entity appears in multiple responses. So still not just a simple case of making some REST API calls.

Re:Airbnb Is Moving Faster at Scale with GraphQL and Apollo by ludwigvan on Sunday January 13, 2019 @09:21AM (#18896763)
> For (1), how does the parent know whether those components will actually be rendered?

Well, usually parent decides whether the children will be rendered or not.

Re:Airbnb Is Moving Faster at Scale with GraphQL and Apollo by exogen on Sunday January 13, 2019 @01:38PM (#18897978)
All the conditionals in your rendering are at the very top level..?