graphql-python / graphql-python/graphql-core

`graphql.utilities.print_schema` module contents are hidden behind `utilities` package

未關閉
#209 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
531
分支
146
PR 合併指標
30 天內沒有已合併 PR

描述

# Summary

`graphql.utilities.__init__.py`'s [export of `print_schema`](https://github.com/graphql-python/graphql-core/blob/v3.3.0a3/src/graphql/utilities/__init__.py#L28-L31) function shadows the module of `graphql.utilities.print_schema`

https://github.com/graphql-python/graphql-core/blob/0c93b8452eed38d4f800c7e71cf6f3f3758cd1c6/src/graphql/utilities/__init__.py#L28-L31

So assume this:

```python
from graphql.utilities import print_schema
```

## Expected behavior

The module [`graphql.utilities.print_schema`](https://github.com/graphql-python/graphql-core/blob/v3.3.0a3/src/graphql/utilities/print_schema.py).

## Results

_As of v3.3.0a3_

The function [`graphql.utilities.print_schema.print_schema()`](https://github.com/graphql-python/graphql-core/blob/v3.3.0a3/src/graphql/utilities/print_schema.py#L35-L38) the function.

## Discussion

https://github.com/graphql-python/graphql-core/blob/v3.3.0a3/src/graphql/utilities/print_schema.py#L32 does use a `__ALL__`, but its contents, which are typed, aren't exported.

### Our use case

In earlier graphql-core versions, we would patch `print_object` - and during migration to graphql-core we found that wasn't available due to package structure.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

首先重現 issue 中描述的匯入行為,然後檢查 src/graphql/utilities/__init__.py 和 src/graphql/utilities/print_schema.py,包括後者的 __ALL__。當公開匯入暴露出 print_schema 模組預期的內容,同時不遺失現有 utility function 已記錄的行為時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
graphql, python
領域
api
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。