Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphql.utilities.print_schema module contents are hidden behind utilities package #209

Open
tony opened this issue Oct 15, 2023 · 0 comments

Comments

@tony
Copy link

tony commented Oct 15, 2023

Summary

graphql.utilities.__init__.py's export of print_schema function shadows the module of graphql.utilities.print_schema

# Print a GraphQLSchema to GraphQL Schema language.
from .print_schema import (
print_introspection_schema,
print_schema,

So assume this:

from graphql.utilities import print_schema

Expected behavior

The module graphql.utilities.print_schema.

Results

As of v3.3.0a3

The function graphql.utilities.print_schema.print_schema() 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant