apollographql / apollographql/fullstack-tutorial
Me Resolver on final is misleading
オープン
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 808
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
This is the resolver for me on final
```
me: async (_, __, { dataSources }) =>
dataSources.userAPI.findOrCreateUser(),
```
However it could (and probably should) be
```
me: async (_, __, context) => context.user
```
which is the logged in user authenticated by the authorization headers.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Issue に示されている最終的な `me` resolver を見つけ、認可ヘッダーから resolver のコンテキストがどのように設定されるかを調べます。`dataSources.userAPI.findOrCreateUser()` を呼び出すのではなく `context.user` を返すべきか確認します。完了の条件は、resolver が認証済みユーザーを一貫して返すことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- graphql, typescript
- 領域
- api, authentication
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100