Skip to content

Commit 4ad5bcd

Browse files
committed
2.0 style query.
1 parent 48afea1 commit 4ad5bcd

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

poetry.lock

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ pytest-mypy-plugins = ">=1.10,<4.0"
6464
pytest-xdist = {extras = ["psutil"], version = "^3.1.0"}
6565
setuptools = ">=67.8.0"
6666
"testing.postgresql" = ">=1.3.0"
67+
asgiref = "^3.7.2"
6768

6869
[tool.black]
6970
line-length = 88

tests/benchmarks/test_relationship_loading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Query:
5959
@strawberry.field
6060
@staticmethod
6161
async def parents(info: Info) -> List[StrawberryParent]:
62-
return info.context["session"].query(Parent).all()
62+
return info.context["session"].scalars(sa.select(Parent)).all()
6363

6464
mapper.finalize()
6565
base.metadata.create_all(engine)

0 commit comments

Comments
 (0)