graphql-python / graphql-python/graphql-core
Add the ability to specify `GraphQLResolveInfo.context` type
未關閉
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 531
- 分支
- 147
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Currently, GraphQLResolveInfo.context is being typed as Any, making GraphQLResolveInfo a generic would give users the ability to provide their type. This is already being done in GraphQL.js
export type GraphQLFieldResolver<
TSource,
TContext,
TArgs = any,
TResult = unknown,
> = (
source: TSource,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo,
) => TResult;
If this change will be welcome, I'd like to make a pull-request implementing it.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先找出 GraphQLResolveInfo 和 GraphQLFieldResolver 的 Python 定義與使用位置,接著將它們處理 context 的方式與 issue 中的 GraphQL.js 範例進行比較。完成的標準是,使用者可以提供 context 型別,而 GraphQLResolveInfo 不會將其視為 Any;請根據專案現有的型別標註與 resolver 覆蓋情況驗證這項變更。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- api
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100