graphql-python / graphql-ws

GraphQL websockets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No module named 'graphql.execution.executors' using graphql-ws

EhiSonoMaestro opened this issue · comments

  • Python version: Python 3.8.10
  • Operating System: Ubuntu 20.04.3 LTS

Hi!
I'm using graphql-ws module to make a simple subscription. To write this webapp's part I followed documentation posted on git. I thought all was ok but when I run my server it raises this error:

File "/home/maestro/exelio/gpexe/gpexe/urls.py", line 16, in <module>
    from graphql_ws.django_channels import GraphQLSubscriptionConsumer
  File "/home/maestro/exelio/gpexe/env2/lib/python3.8/site-packages/graphql_ws/django_channels.py", line 11, in <module>
    from .base_sync import BaseSyncSubscriptionServer
  File "/home/maestro/exelio/gpexe/env2/lib/python3.8/site-packages/graphql_ws/base_sync.py", line 1, in <module>
    from graphql.execution.executors.sync import SyncExecutor
ModuleNotFoundError: No module named 'graphql.execution.executors'

I read that grapql-ws requires graphql-core==2.* , but i need the latest version of it...
Here is a part of my requirments:

graphene~=3.0b7
graphene-django==3.0.0b7
django-graphql-jwt==0.3.2
graphql-ws==0.4.4
graphene-django-optimizer==0.9.0
graphene_file_upload==1.3.0
graphql-core==3.1.6

How can I fix it? Thanks for the help in advance!

Unfortunately, the current graphql-ws is only compatible with graphene~=2.*/graphql-core-legacy..

Not sure on the ETA for a graphql-ws 3.* beta to match ..

Ok thanks for the answer. I thought could be a good idea try to adapt graqhql-ws to graphql 3.* but it is too much work.
To conclude there is not a solution at this moment :(