Strawberry-graphql

Latest version: v0.229.1

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

Scan your dependencies

Page 25 of 119

0.180.1

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

Make StrawberryAnnotation hashable, to make it compatible to newer versions of dacite.

Contributed by [Jaime Coello de Portugal](https://github.com/jaimecp89) via [PR #2790](https://github.com/strawberry-graphql/strawberry/pull/2790/)

0.180.0

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

This release updates the Django Channels integration so that it uses the same base
classes used by all other integrations.

**New features:**

The Django Channels integration supports two new features:

* Setting headers in a response
* File uploads via `multipart/form-data` POST requests

**Breaking changes:**

This release contains a breaking change for the Channels integration. The context
object is now a `dict` and it contains different keys depending on the connection
protocol:

1. HTTP: `request` and `response`. The `request` object contains the full
request (including the body). Previously, `request` was the `GraphQLHTTPConsumer`
instance of the current connection. The consumer is now available via
`request.consumer`.
2. WebSockets: `request`, `ws` and `response`. `request` and `ws` are the same
`GraphQLWSConsumer` instance of the current connection.

If you want to use a dataclass for the context object (like in previous releases),
you can still use them by overriding the `get_context` methods. See the Channels
integration documentation for an example.

Contributed by [Christian Dröge](https://github.com/cdroege) via [PR #2775](https://github.com/strawberry-graphql/strawberry/pull/2775/)

0.179.0

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

This PR allows passing metadata to Strawberry arguments.

Example:

python
import strawberry


strawberry.type
class Query:
strawberry.field
def hello(
self,
info,
input: Annotated[str, strawberry.argument(metadata={"test": "foo"})],
) -> str:
argument_definition = info.get_argument_definition("input")
assert argument_definition.metadata["test"] == "foo"

return f"Hi {input}"


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

0.178.3

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

In this release codegen no longer chokes on queries that have a `__typename` in them.
Python generated types will not have the `__typename` included in the fields.

Contributed by [Matt Gilson](https://github.com/mgilson) via [PR #2797](https://github.com/strawberry-graphql/strawberry/pull/2797/)

0.178.2

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

Prevent AssertionError when using `strawberry codegen` on a query file that contains a mutation.

Contributed by [Matt Gilson](https://github.com/mgilson) via [PR #2795](https://github.com/strawberry-graphql/strawberry/pull/2795/)

0.178.1

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

This release fixes a bug in experimental.pydantic whereby `Optional` type annotations weren't exactly aligned between strawberry type and pydantic model.

Previously this would have caused the series field to be non-nullable in graphql.
python
from typing import Optional
from pydantic import BaseModel, Field
import strawberry


class VehicleModel(BaseModel):
series: Optional[str] = Field(default="")


strawberry.experimental.pydantic.type(model=VehicleModel, all_fields=True)
class VehicleModelType:
pass


Contributed by [Nick Butlin](https://github.com/nicholasbutlin) via [PR #2782](https://github.com/strawberry-graphql/strawberry/pull/2782/)

Page 25 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.