Bug in cancelTrip method from User datasource
@stemmlerjs がすでに取り組んでいます。
2020年2月18日 から。
評価
この issue はまだ評価されていません。
説明
Due to this line cancelTrip throws an error.
{
"errors": [
{
"message": "Cannot read property 'flight_number' of undefined",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"cancelTrip"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"stacktrace": [
"TypeError: Cannot read property 'flight_number' of undefined",
// ....
Following change will fix the error.
async cancelTrip({ launchId }) {
const userId = this.context.user.id;
const numberOfDeletedTrips = await this.store.trips.destroy({ where: { userId, launchId } });
return numberOfDeletedTrips !== 0;
}
As per the doc of destroy it returns number of deleted resources wrapped in Promise. So it should be resolved to get the count to decide if resources are deleted or not.
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 808
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apollographql/fullstack-tutorial のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
investigate
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
documentation
apollographql/fullstack-tutorial#285 · コメント 3 件 · 担当者 1 名 ·
-
investigate
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
apollographql/fullstack-tutorial#255 · リアクション 2 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
apollographql/fullstack-tutorial#254 · コメント 2 件 ·
apollographql/fullstack-tutorial の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug v2
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelcontextprotocol/inspector#2458 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
carbon-design-system/ibm-products#9907 ·