Skip to content
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

Add support for graphene-django v3 #5

Merged
merged 10 commits into from
May 3, 2023
Merged

Add support for graphene-django v3 #5

merged 10 commits into from
May 3, 2023

Conversation

sjdemartini
Copy link
Owner

@sjdemartini sjdemartini commented Oct 5, 2022

Closes #2

graphene-django v3 was officially released https://github.com/graphql-python/graphene-django/releases/tag/v3.0.0, so this branch attempts to add support for it.

Currently outstanding / preventing merge:

This is the default for testing utils in graphene-django v3, so we can
switch to that rather than updating our test settings.
…ning

Otherwise we encounter this warning:

```
graphene/utils/subclass_with_meta.py:46: DeprecationWarning: Creating a DjangoObjectType without either the `fields` or the `exclude` option is deprecated. Add an explicit `fields = '__all__'` option on DjangoObjectType User to use all fields
    super_class.__init_subclass_with_meta__(**options)
```
Only encountered this in CI, where poetry 1.2 started getting installed
(https://github.com/sjdemartini/graphene-django-permissions/actions/runs/3284716438/jobs/5411001549),
since originally I was using Poetry 1.1 locally:

```
poetry.core.constraints.version.exceptions.ParseConstraintError: Could not parse version constraint: ^3.0.0*
```

Poetry 1.2 (released August 2022) contained a backwards incompatible
change for `allow-preleases` logic, which led to this breakage (and
difference from 1.1). See
python-poetry/poetry#3538 (comment)
for the new preferred approach.
The new 3.0.2 release includes a fix for the SQL query performance
regression
https://github.com/graphql-python/graphene-django/releases/tag/v3.0.2
(graphql-python/graphene-django#1401) which was
causing test failures on this branch.
@codecov-commenter
Copy link

codecov-commenter commented May 3, 2023

Codecov Report

Merging #5 (77af999) into main (e9fb30f) will not change coverage.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           33        33           
  Branches        10         8    -2     
=========================================
  Hits            33        33           
Impacted Files Coverage Δ
graphene_django_permissions/middleware.py 100.00% <100.00%> (ø)

@sjdemartini sjdemartini merged commit 31a683a into main May 3, 2023
@sjdemartini sjdemartini deleted the graphene-django-v3 branch May 3, 2023 23:22
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.

Add support for graphene v3
2 participants