graphql-python / graphql-python/graphql-core
`graphql.utilities.print_schema` module contents are hidden behind `utilities` package
- Linguagem predominante
- Python
- Estrelas
- 531
- Forks
- 146
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
# 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.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Start by reproducing the import behavior described in the issue, then inspect src/graphql/utilities/__init__.py and src/graphql/utilities/print_schema.py, including the latter's __ALL__. Done means the public import exposes the intended print_schema module contents without losing the documented behavior of the existing utility function.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- graphql, python
- Domínio
- api
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100