You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
What is the current behavior?
Getting this error:
TypeError: Expected to be a GraphQL schema
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
a github repo, https://repl.it or similar.
>>> import graphene
>>> class Query(graphene.ObjectType):
... name = graphene.String()
...
>>> import graphql
>>> new_schema = graphene.Schema(query=Query)
>>> graphql.type.validate_schema(new_schema)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/tsk147/.local/share/virtualenvs/temp-zjU4Ht41/lib/python3.10/site-packages/graphql/type/validate.py", line 62, in validate_schema
assert_schema(schema)
File "/Users/tsk147/.local/share/virtualenvs/temp-zjU4Ht41/lib/python3.10/site-packages/graphql/type/schema.py", line 449, in assert_schema
raise TypeError(f"Expected {inspect(schema)} to be a GraphQL schema.")
TypeError: Expected <Schema instance> to be a GraphQL schema.
What is the expected behavior?
I would expect this to be a GraphQL schema type, and the validation to pass.
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
Getting this error:
TypeError: Expected to be a GraphQL schema
a github repo, https://repl.it or similar.
Brand new virtual environment, Python 3.10
Pipfile looks like this:
and Pipfile.lock:
Executed the following in pipenv shell:
What is the expected behavior?
I would expect this to be a GraphQL schema type, and the validation to pass.
What is the motivation / use case for changing the behavior?
We have a legacy code application that needs to migrate to graphene v3 (in order to use the disable_introspection feature: https://github.com/graphql-python/graphene/blob/master/graphene/validation/disable_introspection.py) but when I upgrade to the latest graphene version, I get the above error.
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
The text was updated successfully, but these errors were encountered: