diff --git a/platformics/codegen/templates/graphql_api/types/class_name.py.j2 b/platformics/codegen/templates/graphql_api/types/class_name.py.j2 index 23023c9..a300918 100644 --- a/platformics/codegen/templates/graphql_api/types/class_name.py.j2 +++ b/platformics/codegen/templates/graphql_api/types/class_name.py.j2 @@ -44,7 +44,6 @@ from sqlalchemy import inspect from sqlalchemy.engine.row import RowMapping from sqlalchemy.ext.asyncio import AsyncSession from platformics.graphql_api import relay -from strawberry.field import StrawberryField from strawberry.types import Info from support.limit_offset import LimitOffsetClause from typing_extensions import TypedDict diff --git a/platformics/graphql_api/core/strawberry_extensions.py b/platformics/graphql_api/core/strawberry_extensions.py index d7f2b1a..29c9a2b 100644 --- a/platformics/graphql_api/core/strawberry_extensions.py +++ b/platformics/graphql_api/core/strawberry_extensions.py @@ -8,8 +8,8 @@ from fastapi.dependencies.models import Dependant from fastapi.params import Depends as DependsClass from strawberry.extensions import FieldExtension -from strawberry.field import StrawberryField from strawberry.types import Info +from strawberry.types.field import StrawberryField def get_func_with_only_deps(func: typing.Callable[..., typing.Any]) -> typing.Callable[..., typing.Any]: diff --git a/platformics/graphql_api/relay/fields.py b/platformics/graphql_api/relay/fields.py index 317977f..e335c2c 100644 --- a/platformics/graphql_api/relay/fields.py +++ b/platformics/graphql_api/relay/fields.py @@ -25,16 +25,16 @@ import strawberry from strawberry.annotation import StrawberryAnnotation -from strawberry.arguments import StrawberryArgument, argument from strawberry.extensions.field_extension import ( AsyncExtensionResolver, FieldExtension, SyncExtensionResolver, ) -from strawberry.field import _RESOLVER_TYPE, StrawberryField, field -from strawberry.lazy_type import LazyType -from strawberry.type import StrawberryList, StrawberryOptional +from strawberry.types.arguments import StrawberryArgument, argument +from strawberry.types.base import StrawberryList, StrawberryOptional +from strawberry.types.field import _RESOLVER_TYPE, StrawberryField, field from strawberry.types.fields.resolver import StrawberryResolver +from strawberry.types.lazy_type import LazyType from strawberry.utils.aio import asyncgen_to_list from strawberry.utils.typing import eval_type from typing_extensions import Annotated, get_origin diff --git a/platformics/graphql_api/relay/types.py b/platformics/graphql_api/relay/types.py index d688245..ef2a1e1 100644 --- a/platformics/graphql_api/relay/types.py +++ b/platformics/graphql_api/relay/types.py @@ -24,15 +24,15 @@ ) import strawberry -from strawberry.field import field -from strawberry.object_type import interface, type -from strawberry.private import StrawberryPrivate # from strawberry.relay import GlobalID # from strawberry.relay import Node as StrawberryNode -from strawberry.type import StrawberryContainer, get_object_definition +from strawberry.types import get_object_definition +from strawberry.types.base import StrawberryContainer, StrawberryObjectDefinition +from strawberry.types.field import field from strawberry.types.info import Info # noqa: TCH001 -from strawberry.types.types import StrawberryObjectDefinition +from strawberry.types.object_type import interface, type +from strawberry.types.private import StrawberryPrivate from strawberry.utils.aio import aenumerate, aislice, resolve_awaitable from strawberry.utils.inspect import in_async_context from strawberry.utils.typing import eval_type, is_classvar diff --git a/poetry.lock b/poetry.lock index 5e2f3c1..f53effc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3570,37 +3570,37 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7 [[package]] name = "strawberry-graphql" -version = "0.217.1" +version = "0.257.0" description = "A library for creating GraphQL APIs" optional = false -python-versions = ">=3.8,<4.0" +python-versions = "<4.0,>=3.9" files = [ - {file = "strawberry_graphql-0.217.1-py3-none-any.whl", hash = "sha256:b54ecd323f88a86d184012ac7049c8f58879c6913a75b69d9be5e0fb1b3ba0b5"}, - {file = "strawberry_graphql-0.217.1.tar.gz", hash = "sha256:3246dfe871d8ee4d57ff98ea0678080a3bcd242cdd287a60fd180cb66a6554ff"}, + {file = "strawberry_graphql-0.257.0-py3-none-any.whl", hash = "sha256:07781c1448c94dc533bce8372d1561e7723bdcee901ac1593b2231953e4c5333"}, + {file = "strawberry_graphql-0.257.0.tar.gz", hash = "sha256:4f95c432fe6091df7e910e9ab3de2ae6cee80183208b669544ef6129d6b6e916"}, ] [package.dependencies] -graphql-core = ">=3.2.0,<3.3.0" +graphql-core = ">=3.2.0,<3.4.0" python-dateutil = ">=2.7.0,<3.0.0" typing-extensions = ">=4.5.0" [package.extras] aiohttp = ["aiohttp (>=3.7.4.post0,<4.0.0)"] -asgi = ["python-multipart (>=0.0.5,<0.0.7)", "starlette (>=0.18.0)"] +asgi = ["python-multipart (>=0.0.7)", "starlette (>=0.18.0)"] chalice = ["chalice (>=1.22,<2.0)"] channels = ["asgiref (>=3.2,<4.0)", "channels (>=3.0.5)"] cli = ["libcst (>=0.4.7)", "pygments (>=2.3,<3.0)", "rich (>=12.0.0)", "typer (>=0.7.0)"] debug = ["libcst (>=0.4.7)", "rich (>=12.0.0)"] -debug-server = ["libcst (>=0.4.7)", "pygments (>=2.3,<3.0)", "python-multipart (>=0.0.5,<0.0.7)", "rich (>=12.0.0)", "starlette (>=0.18.0)", "typer (>=0.7.0)", "uvicorn (>=0.11.6)"] +debug-server = ["libcst (>=0.4.7)", "pygments (>=2.3,<3.0)", "python-multipart (>=0.0.7)", "rich (>=12.0.0)", "starlette (>=0.18.0)", "typer (>=0.7.0)", "uvicorn (>=0.11.6)"] django = ["Django (>=3.2)", "asgiref (>=3.2,<4.0)"] -fastapi = ["fastapi (>=0.65.2)", "python-multipart (>=0.0.5,<0.0.7)"] +fastapi = ["fastapi (>=0.65.2)", "python-multipart (>=0.0.7)"] flask = ["flask (>=1.1)"] +litestar = ["litestar (>=2)"] opentelemetry = ["opentelemetry-api (<2)", "opentelemetry-sdk (<2)"] pydantic = ["pydantic (>1.6.1)"] pyinstrument = ["pyinstrument (>=4.0.0)"] quart = ["quart (>=0.19.3)"] sanic = ["sanic (>=20.12.2)"] -starlite = ["starlite (>=1.48.0)"] [[package]] name = "strcase" @@ -3955,4 +3955,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "9acf419f68a0dfc55b906f6f348221e11232747a656c41836b805bb78ff801f5" +content-hash = "a9ebc14888574c3ec28434ff46a901dae47aa2c1dea24e85c7599f4a2376ba5d" diff --git a/pyproject.toml b/pyproject.toml index b647caf..f355183 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ linkml = "^1.5.7" strcase = "^1.0.0" linkml-runtime = "^1.6.0" sqlalchemy_utils = "^0.41.1" -strawberry-graphql = "^0.217.0" +strawberry-graphql = "0.257.0" [build-system] requires = ["poetry-core", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]