apollographql / apollographql/fullstack-tutorial
Confusing naming of function passed to Array.map
- 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
Research direction
Open final/server/src/datasources/launch.js at the launchReducer definition and inspect where it is passed to Array.map. Check for any other references to the function, then update the naming consistently so the function's name reflects its mapping role.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100