Closed jlengstorf closed 6 years ago
It looks like it's using Object.keys already with for...of
Oh, yep. Ha.
We may still want to refactor this to use a map instead (to avoid nested loops and syntax that clearly confused me 😆).
My preference originally was to use R.map, it always makes me with there was Object.map
Here's a PR https://github.com/gramps-graphql/gramps/pull/24 using forEach
Per the V8 team, using
for...in
has performance issues:https://twitter.com/bmeurer/status/927500214436589568
We should swap it out in https://github.com/gramps-graphql/gramps/blob/master/src/lib/mapResolvers.js#L3-L14