Skip to content

Upgrade graphene to v3 #143

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

Conversation

fabienheureux
Copy link
Contributor

@fabienheureux fabienheureux commented Nov 23, 2020

Graphene v3 is almost there...since this summer.
In fact the release is blocked by several things:

  • some packages of graphene ecosystem are almost abandonned
  • Graphene team wants every package of the ecosystem to be ready before releasing an official graphene v3 upgrade
  • The maintainer (jkimbo) who did a great job tracking graphene v3 changes left a few days ago

So this is more likely we are a bit far from getting an official graphene v3 release, but I use it on production on a django / graphene project without major issues, and this project does not use dataloaders or other fancy features from graphene (that are poorly supported in graphene v3), so the upgrade should be really safe.

Fixes #241

@NathHorrigan
Copy link
Contributor

The hack that removes NoUnusedFragmentsRule validator

This hack is not compliant with the spec but doesn't break anything per se. This originally came about when we first writing the preview compatibility with Gatsby. I know more about the GraphQL AST now and could probably write a parser that only imports the one that are used TBH (Obviously this would be taken care of in the Gatsby package).

@fabienheureux
Copy link
Contributor Author

The hack that removes NoUnusedFragmentsRule validator

This hack is not compliant with the spec but doesn't break anything per se. This originally came about when we first writing the preview compatibility with Gatsby. I know more about the GraphQL AST now and could probably write a parser that only imports the one that are used TBH (Obviously this would be taken care of in the Gatsby package).

I currently catch the FrozenError and do nothing

@fabienheureux fabienheureux force-pushed the feature/graphene-v3-upgrade branch from 108502a to 60a669a Compare January 14, 2021 19:45
Base automatically changed from master to main January 16, 2021 01:22
@fabienheureux fabienheureux force-pushed the feature/graphene-v3-upgrade branch from 12bae71 to c62bdac Compare February 7, 2021 02:11
@fabienheureux
Copy link
Contributor Author

Tests finally pass 🎉

It would be nice to have a review at this stage (@zerolab @ruisaraiva19 @NathHorrigan).
I am in the process of adding benchmarks but I don't think these should block the code review.
Thanks !

@fabienheureux fabienheureux changed the title [WIP] Upgrade graphene to v3 Upgrade graphene to v3 Feb 7, 2021
@fabienheureux
Copy link
Contributor Author

To follow up on this: graphql-python/graphene#1300
There is an open PR on Graphene repo related to the issue with None being passed into the kwargs when no value is provided.

@ruisaraiva19 ruisaraiva19 marked this pull request as draft July 19, 2021 09:25
@jams2 jams2 mentioned this pull request Aug 31, 2022
@zerolab
Copy link
Member

zerolab commented Sep 28, 2022

graphene-django v3.0.0 was just released, which adds Django 4 support.

https://github.com/graphql-python/graphene-django/releases/tag/v3.0.0

Relevant PR: graphql-python/graphene-django#1281

via #241 (comment) /ht @PeterDekkers


@fabienheureux any chance you have the time to look at the final tweaks here?

@fabienheureux
Copy link
Contributor Author

graphene-django v3.0.0 was just released, which adds Django 4 support.

https://github.com/graphql-python/graphene-django/releases/tag/v3.0.0

Relevant PR: graphql-python/graphene-django#1281

via #241 (comment) /ht @PeterDekkers

@fabienheureux any chance you have the time to look at the final tweaks here?

Thanks for the nudge @zerolab, I will have some time in about ten days to finish this up.

@dopry
Copy link
Collaborator

dopry commented Dec 17, 2022

@fabienheureux Do you have any time to pick this up? I'm in the midst of implementing some federated fields to another api and I would really like to use gql >=3 with aiohttp support, but I'm getting a conflict with graphql-core. I'm happy to look into it as well if you're busy on other things.

@dopry
Copy link
Collaborator

dopry commented Dec 17, 2022

@fabienheureux I did some work on your branch and pushed it to my fork. see: https://github.com/dopry/wagtail-grapple/commits/feature/graphene-v3-upgrade

@dopry dopry mentioned this pull request Dec 17, 2022
@zerolab
Copy link
Member

zerolab commented Dec 19, 2022

Will close this in favour of #285
@fabienheureux thank you for chipping away at it.
@dopry cheers for picking it up

@zerolab zerolab closed this Dec 19, 2022
@fabienheureux
Copy link
Contributor Author

Thanks a lot for picking this up @zerolab, sorry got a bit busy with client work lately.

zerolab added a commit that referenced this pull request Dec 29, 2022
Co-Authored-By: Darrel O'Pry <[email protected]>
Co-Authored-By: Fabien Le Frapper <[email protected]>
@zerolab zerolab mentioned this pull request Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add django 4.1 support
5 participants