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 context 如何从授权 headers 中填充。验证它是否应该返回 `context.user`,而不是调用 `dataSources.userAPI.findOrCreateUser()`;完成标准是 resolver 始终一致地返回经过身份验证的用户。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- graphql, typescript
- 领域
- api, authentication
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100