[REQUEST] Option to not cache errors
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- backend
調査の方向性
まず、DataLoader の load と batch-load のキャッシュ動作を読み、特に batch-load 配列で返されるエラーがどのように処理されるかを確認してください。キャッシュとエラーレスポンスに関する既存のテストを確認し、そのうえで、提案されたオプションまたは比較関数によって選択したエラーがキャッシュされず、デフォルトでは現在の動作が維持されることを検証してください。
索引モデルが issue の本文から書いたものです。
説明
What problem are you trying to solve?
We have cases where we are using a dataloader on the server that utilizes server credentials to cache data that is used to resolve user requests (but not directly accessible to users). We refresh this cache everytime our server credentials are renewed (8 hrs). However, if we end up receiving a network error in those 8 hours, we cache that error as the response for a load.
Describe the solution you'd like
An option to not cache errors returned in the batch load return array. Or a comparison function that can evaluate whether to cache or not. (eg instanceof checks for certain error types)
Describe alternatives you've considered
Add additional code at all .load sites to clear the cache of these error values. This is onerous and prone to error
Monkeypatching the dataloader load function to clear the cache when an error is returned.
Additional context
This seems like it would be handy, but I also understand if it is an overspecific feature
- 主要言語
- JavaScript
- スター
- 13.4k
- フォーク
- 522
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphql/dataloader のほかの issue
-
[BUG] `maxBatchSize: NaN` is accepted and silently disables batching対応中かも @RaphaelFakhri が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
graphql/dataloader#405 ·
-
Failed batch evicts a replacement cache entry after clear/prime対応中かも @Claire-ovo が 11 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
graphql/dataloader#403 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
graphql/dataloader#393 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
graphql/dataloader#382 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
graphql/dataloader#379 · コメント 2 件 · リアクション 5 件 ·
graphql/dataloader の issue をすべて見る
似ている issue
-
binding:python bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug needs-triage potential-regression
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aws/aws-sdk-js-v3#8408 ·
メンテナーはふだん 1 日以内に返信
-
[v3] KeyBindingManager calls (Add/Remove) are not converted into a case-insensitive accelerator.KeyオープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100