Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
django-version:
- 4.2.*
- 5.0.*
graphql-core-version:
- 3.3.0a5
- 3.2.3
Copy link
Member

Choose a reason for hiding this comment

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

Maybe 3.2.*, just to make sure we get the latest patch release, like we do for django?

Not sure if 3.3.* would work as it is a pre-release, and usually those have to be totally hardcoded

python-version:
- '3.8'
- '3.9'
Expand Down Expand Up @@ -80,6 +83,8 @@ jobs:
run: poetry install
- name: Install Django ${{ matrix.django-version }}
run: poetry run pip install "django==${{ matrix.django-version }}"
- name: Install graphql-core ${{ matrix.graphql-core-version }}
run: poetry run pip install "graphql-core==${{ matrix.graphql-core-version }}"
- name: Test with pytest
run: poetry run pytest --showlocals -vvv --cov-report=xml
- name: Upload coverage to Codecov
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion strawberry_django/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@
GraphQLWrappingType,
get_argument_values,
)
from graphql.execution.collect_fields import collect_sub_fields

try:
from graphql.execution.collect_fields import collect_sub_fields
except ImportError:
from graphql.execution.collect_fields import collect_subfields as collect_sub_fields
Copy link
Member

Choose a reason for hiding this comment

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

Probably will need to type ignore this line


from graphql.language.ast import OperationType
from graphql.type.definition import GraphQLResolveInfo, get_named_type
from strawberry import relay
Expand Down