Netflix / falcor-router

A Falcor JavaScript DataSource which creates a Virtual JSON Graph document on your app server.
http://netflix.github.io/falcor
Apache License 2.0
104 stars 46 forks source link

Fire error hook while merging graphs with nodes of `$type === 'error'` #204

Closed benlesh closed 7 years ago

benlesh commented 7 years ago

cc @jhusain @sdesai

benlesh commented 7 years ago

oops, looks like I accidentally have some cruft from the prettier PR in here. I'll clean that up

benlesh commented 7 years ago

Noted from @jhusain's review: "perhaps we shouldn't pass the routerInstance around, but it it's probably not a big deal, it's likely we'll need it for something else in the future"

Related note from me: We're using the router instance in some of our middleware to pass in a logger that we use to that errorHook, so we need to have a this context of the router instance in the _errorHook call. @jhusain noted that using bind might not be too expensive if we're doing it at the beginning of the merge, but we'll probably just leave the router instance passing for now.