apollographql / apollographql/fullstack-tutorial

Confusing naming of function passed to Array.map

オープン
#138 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
1.2k
フォーク
808
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

final/server/src/datasources/launch.js の launchReducer 定義を開き、Array.map に渡されている箇所を確認します。関数への他の参照がないか確認し、その後、関数名がマッピングの役割を反映するように命名を一貫して更新します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
backend
issue の種類
リファクタリング
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。