pythonpython-3.xflaskariadne-graphql

Python Ariadne GraphQL "cannot import name 'GraphQLNamedType'"


I am using Ariadne with Flask.

When I try from ariadne import QueryType, graphql_sync, make_executable_schema as indicated in the Ariadne's doc for Flask I get the following error :

ImportError: cannot import name 'GraphQLNamedType'

I am using :


Solution

  • Seems the issue came from graphql-core version which need to be >=3.

    I was unabled to install the version >=3 so I upgraded Python to 3.8. When installing Ariadne, I get the same version 0.11.0 but now the graphql-core version 3.0.5 and no more the error.