Skip to content

Broken with graphql-core==3.0.0 #18

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

Closed
cuyu opened this issue Dec 10, 2019 · 10 comments
Closed

Broken with graphql-core==3.0.0 #18

cuyu opened this issue Dec 10, 2019 · 10 comments
Assignees

Comments

@cuyu
Copy link

cuyu commented Dec 10, 2019

My code is broken after using graphql-core==3.0.0:

Traceback (most recent call last):
  File "./web_backend/server.py", line 3, in <module>
    from sanic_graphql import GraphQLView
  File "/root/.local/share/virtualenvs/opt-zvmYt2-H/lib/python3.7/site-packages/sanic_graphql/__init__.py", line 1, in <module>
    from .graphqlview import GraphQLView
  File "/root/.local/share/virtualenvs/opt-zvmYt2-H/lib/python3.7/site-packages/sanic_graphql/graphqlview.py", line 10, in <module>
    from graphql.execution.executors.asyncio import AsyncioExecutor
ModuleNotFoundError: No module named 'graphql.execution.executors
@Cito
Copy link
Member

Cito commented Dec 10, 2019

The requirements in setup.py, 'graphql-core>=2.1', and 'graphql-server-core>=1.1.1', both need a restriction "..,<3". Maybe sanic needs a restriction as well. I will try to push a release fixed release to PyPI this week. As a workaround, you can first install graphql-core<3, and then sanic-graphql.

@Cito Cito self-assigned this Dec 10, 2019
@johndiego
Copy link

same error !!

@grammy-jiang
Copy link

I met the same error.

The version of graphql-core is not restricted.

The version 3 of the package of graphql-python/graphql-core is not backward-compatible with version 2.

I haven't got time to check the solution.

@grammy-jiang
Copy link

Just note, until today, the major project of graphql - graphql-python/graphene v2.1.8 - is still working with "graphql-core>=2.1,<3", while it just release a beta version 3.0.0b2 with graphql-core v3+ required.

@Cito Cito assigned Cito and jkimbo and unassigned Cito Jun 26, 2020
@Cito
Copy link
Member

Cito commented Jun 26, 2020

@jkimbo can you push a 1.2.0 release to solve this? I'm missing the permissions on PyPI, but you should be able to do that.

@jkimbo
Copy link
Member

jkimbo commented Jun 27, 2020

@Cito done. v1.2.0 is now available on PyPi (sorry it's taken so long to do this).

@Cito
Copy link
Member

Cito commented Jun 27, 2020

You meant now not not - thank you!

Now we can also start updating this project to core v3.

@Cito Cito closed this as completed Jun 27, 2020
@grammy-jiang
Copy link

Nice to have a new release with version fixed.

And one more thing - now Sanic version is fixed lower than 19, which is 20.6.3 now. If the next release can compatible with the latest Sanic version, it will be very good.

@grammy-jiang
Copy link

Also, if the version of this package can be embedded as __version__, it will be great.

@jkimbo
Copy link
Member

jkimbo commented Jul 5, 2020

Good point @grammy-jiang . We’re currently in the process of merging all the server integrations into the graphql-server package (see graphql-python/graphql-server#34) so I’ve created an issue there to expose the version attribute: graphql-python/graphql-server#47

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

5 participants