Skip to content

Add support for graphql-core 3.2.0 #29

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

Merged
merged 4 commits into from
Jun 1, 2022
Merged

Conversation

ddelange
Copy link
Contributor

@ddelange ddelange commented May 30, 2022

Add minor pin on graphql-core as their minors are synchronized with upstream majors (docs)
Only run push trigger on master branch
Remove poetry.lock ref https://stackoverflow.com/a/61076546/5511061

Fixes #26

$ pipgrip --tree starlette-graphene3@git+https://github.com/ddelange/starlette-graphene3.git@patch-1
starlette-graphene3@ git+https://github.com/ddelange/starlette-graphene3.git@patch-1 (git+https://github.com/ddelange/starlette-graphene3.git@patch-1)
├── graphene>=3.0b6 (3.1)
│   ├── aniso8601<10,>=8 (9.0.1)
│   ├── graphql-core<3.3,>=3.1 (3.2.1)
│   └── graphql-relay<3.3,>=3.1 (3.2.0)
│       └── graphql-core<3.3,>=3.2 (3.2.1)
├── graphql-core<3.3,>=3.1 (3.2.1)
└── starlette>=0.14.1 (0.20.1)
    ├── anyio<5,>=3.4.0 (3.6.1)
    │   ├── idna>=2.8 (3.3)
    │   └── sniffio>=1.1 (1.2.0)
    └── typing-extensions>=3.10.0 (4.2.0)

Bump graphene minimum pin to 3.1
Only run push trigger on master branch
Remove poetry.lock ref https://stackoverflow.com/a/61076546/5511061
@ddelange
Copy link
Contributor Author

@erikwrede if there's more you spotted, plz let me know :) CI is passing on my fork

Copy link

@flipbit03 flipbit03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

pyproject.toml Outdated
@@ -16,7 +16,7 @@ classifiers = [

[tool.poetry.dependencies]
python = "^3.7"
graphene = ">=3.0b6"
graphene = "~=3.1"
Copy link
Contributor

@erikwrede erikwrede May 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the changes are possible without dropping support for graphene 3.0. GQLFormattedError should already exist in the former GQL-Core release - will check tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like GQLFormattedError was introduced in graphgl-core 3.2.0 in the same commit graphql-python/graphql-core@09ff14f (from diff graphql-python/graphql-core@v3.1.7...v3.2.0)

Since graphene 3.1 is the first release to (properly) support graphgl-core 3.2.0, I think this lower pin makes sense. Previous versions of this lib can still be used with graphql-core<3.2, risking dephell with the earlier versions of graphene/gql/graphql-core/graphql-relay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from a closer look: graphene 3.1 still allows graphql-core 3.1, whereas this PR drops support. so either this PR should introduce compat import statements, or this PR should drop support:

Suggested change
graphene = "~=3.1"
graphene = "~=3.1"
graphql-core = "~=3.2"

what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your suggestion seems to be necessary to prevent compatibility issues. Whether or not to introduce compatibility import statements is a question of scope. This is a quick fix, compatibility imports would increase complexity.
The cleaner way to go would be by supporting all core versions that graphene supports, aligning with the main library.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

towards preventing future compatibility issues: ddelange#2

I think it's one step forward, plz let me know what you think :)

ddelange added 2 commits June 1, 2022 10:16
Synchronize graphql-core support with graphene
@ddelange
Copy link
Contributor Author

ddelange commented Jun 1, 2022

@ciscorn if you get the chance, please squash this PR as it turned out to be more than one commit 😅

@ciscorn ciscorn merged commit 2a92060 into ciscorn:master Jun 1, 2022
@ciscorn
Copy link
Owner

ciscorn commented Jun 1, 2022

thank you!

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

Successfully merging this pull request may close these issues.

graphql-relay 3.2.0 breaks
6 participants