Skip to content

Commit 1be8a65

Browse files
authored
feat: initial relay integration support (#65)
* feat: initial relay integration support * feat: implement node() * refactor: use ListConnection as a base for connections * fix: fix broken tests on CI * chore: add a RELEASE.md file * feat: add sqlakeyset integration * fix: remove mentions of "django" in the code * fix: some more fixes * perf: cache id_attr resolution * docs: add some TODO comments for the future
1 parent af6a48c commit 1be8a65

File tree

12 files changed

+2391
-26
lines changed

12 files changed

+2391
-26
lines changed

RELEASE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Release type: minor
2+
3+
Initial relay connection/node support using Strawberry's relay integration.

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ sqlalchemy = {extras = ["asyncio"], version = ">=1.4"}
4444
strawberry-graphql = ">=0.95"
4545
sentinel = ">=0.3,<1.1"
4646
greenlet = {version = ">=3.0.0rc1", python = ">=3.12"}
47+
sqlakeyset = "^2.0.1695177552"
4748

4849
[tool.poetry.group.dev.dependencies]
4950
asyncpg = ">=0.28,<0.30"
@@ -251,6 +252,7 @@ src = ["src/strawberry_sqlalchemy_mapper", "tests"]
251252

252253
[tool.ruff.per-file-ignores]
253254
"tests/*" = ["RSE102", "SLF001", "TCH001", "TCH002", "TCH003", "ANN001", "ANN201", "PLW0603", "PLC1901", "S603", "S607", "B018"]
255+
"src/strawberry_sqlalchemy_mapper/field.py" = ["TCH001", "TCH002", "TCH003"]
254256

255257
[tool.ruff.isort]
256258
known-first-party = ["strawberry-sqlalchemy-mapper"]

src/strawberry_sqlalchemy_mapper/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@
1616
del version, PackageNotFoundError
1717

1818

19+
from .field import connection, field, node
1920
from .loader import StrawberrySQLAlchemyLoader
2021
from .mapper import StrawberrySQLAlchemyMapper
2122

22-
__all__ = ["__version__", "StrawberrySQLAlchemyLoader", "StrawberrySQLAlchemyMapper"]
23+
__all__ = [
24+
"__version__",
25+
"StrawberrySQLAlchemyLoader",
26+
"StrawberrySQLAlchemyMapper",
27+
"field",
28+
"node",
29+
"connection",
30+
]

0 commit comments

Comments
 (0)