apollographql / apollographql/fullstack-tutorial
Error object in Integration test is different compared to error in playground
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 808
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I wanted to test the error scenario for my query/mutation but I’m unable to do so. I've reproduced the issue in this [PR here at this line](https://github.com/apollographql/fullstack-tutorial/pull/153/files#diff-e38243b449b86e768973cba723ec7c8fR103).
Basically the problem is that when one of our datasource methods triggers an error then the `errorFromResponse` method is called and then the error is returned and we see that error in our playground but when you try to test it and mock the error in your test the error you get from query/mutation method from `apollo-server-testing` are both different.
#153
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
PR #153 の統合テストケースから、具体的には 103 行目にあるリンク先の diff から始め、errorFromResponse と apollo-server-testing の query/mutation 呼び出しを通じて datasource エラーを追跡します。その結果を playground のエラーと比較し、影響を受ける統合テストを実行します。テストが playground と同じエラー形式またはメッセージで datasource の失敗を再現できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- graphql, node.js, typescript
- 領域
- api, testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100