apollographql / apollographql/fullstack-tutorial

Confusing naming of function passed to Array.map

Open
#138 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.2k
Forks
808
PR merge metrics
No merged PRs in 30d

Description

Hello,
not a real issue but just a naming of a method that confused me for a bit.
In [datasource/launch](https://github.com/apollographql/fullstack-tutorial/blob/master/final/server/src/datasources/launch.js#L10) there is method called `launchReducer` passed to `Array.map`. This method is responsible to take each launch returned by the Rest API and **mapping** it to another object.
So I guess this function should be called `lauchMapper`, because that's what it does. It doesn't reduce multiple element into a single one, isn't it?

Just highlighting this because it is a bit confusing

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.