Strawberry-graphql

Latest version: v0.235.0

Safety actively analyzes 638437 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 79 of 122

0.76.1

Not secure
-------------------

Change the version constraint of opentelemetry-sdk and opentelemetry-api to <2

Contributed by [Michael Ossareh](https://github.com/ossareh) [PR #1226](https://github.com/strawberry-graphql/strawberry/pull/1226/)

0.76.0

Not secure
-------------------

This release adds support for enabling subscriptions in GraphiQL
on Django by setting a flag `subscriptions_enabled` on the BaseView class.
python
from strawberry.django.views import AsyncGraphQLView

from .schema import schema

urlpatterns = [
path(
"graphql",
AsyncGraphQLView.as_view(
schema=schema, graphiql=True, subscriptions_enabled=True
),
)
]


Contributed by [lijok](https://github.com/lijok) [PR #1215](https://github.com/strawberry-graphql/strawberry/pull/1215/)

0.75.1

Not secure
-------------------

This release fixes an issue with the MyPy plugin that prevented using
TextChoices from django in `strawberry.enum`.

Contributed by [Patrick Arminio](https://github.com/patrick91) [PR #1202](https://github.com/strawberry-graphql/strawberry/pull/1202/)

0.75.0

Not secure
-------------------

This release improves how we deal with custom scalars. Instead of being global
they are now scoped to the schema. This allows you to have multiple schemas in
the same project with different scalars.

Also you can now override the built in scalars with your own custom
implementation. Out of the box Strawberry provides you with custom scalars for
common Python types like `datetime` and `Decimal`. If you require a custom
implementation of one of these built in scalars you can now pass a map of
overrides to your schema:

python
from datetime import datetime, timezone
import strawberry

EpochDateTime = strawberry.scalar(
datetime,
serialize=lambda value: int(value.timestamp()),
parse_value=lambda value: datetime.fromtimestamp(int(value), timezone.utc),
)


strawberry.type
class Query:
strawberry.field
def current_time(self) -> datetime:
return datetime.now()


schema = strawberry.Schema(
Query,
scalar_overrides={
datetime: EpochDateTime,
},
)
result = schema.execute_sync("{ currentTime }")
assert result.data == {"currentTime": 1628683200}


Contributed by [Jonathan Kim](https://github.com/jkimbo) [PR #1147](https://github.com/strawberry-graphql/strawberry/pull/1147/)

0.74.1

Not secure
-------------------

This release allows to install Strawberry along side `click` version 8.

Contributed by [Patrick Arminio](https://github.com/patrick91) [PR #1181](https://github.com/strawberry-graphql/strawberry/pull/1181/)

0.74.0

Not secure
-------------------

This release add full support for async directives and fixes and issue when
using directives and async extensions.

python
strawberry.type
class Query:
name: str = "Banana"


strawberry.directive(
locations=[DirectiveLocation.FIELD], description="Make string uppercase"
)
async def uppercase(value: str):
return value.upper()


schema = strawberry.Schema(query=Query, directives=[uppercase])


Contributed by [Patrick Arminio](https://github.com/patrick91) [PR #1179](https://github.com/strawberry-graphql/strawberry/pull/1179/)

Page 79 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.