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 31 of 119

0.164.1

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

Fix interface duplication leading to schema compilation error in multiple
inheritance scenarios (i.e. "Diamond Problem" inheritance)

Thank you mzhu22 for the thorough bug report!

Contributed by [San Kilkis](https://github.com/skilkis) via [PR #2647](https://github.com/strawberry-graphql/strawberry/pull/2647/)

0.164.0

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

This release introduces a breaking change to make pydantic default behavior consistent with normal strawberry types.
This changes the schema generated for pydantic types, that are required, and have default values.
Previously pydantic type with a default, would get converted to a strawberry type that is not required.
This is now fixed, and the schema will now correctly show the type as required.

python
import pydantic
import strawberry


class UserPydantic(pydantic.BaseModel):
name: str = "James"


strawberry.experimental.pydantic.type(UserPydantic, all_fields=True)
class User: ...


strawberry.type
class Query:
a: User = strawberry.field()

strawberry.field
def a(self) -> User:
return User()

The schema is now

type Query {
a: User!
}

type User {
name: String! // String! rather than String previously
}


Contributed by [James Chua](https://github.com/thejaminator) via [PR #2623](https://github.com/strawberry-graphql/strawberry/pull/2623/)

0.163.2

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

This release covers an edge case where the following would not give a nice error.
python
some_field: "Union[list[str], SomeType]]"

Fixes [2591](https://github.com/strawberry-graphql/strawberry/issues/2591)

Contributed by [ניר](https://github.com/nrbnlulu) via [PR #2593](https://github.com/strawberry-graphql/strawberry/pull/2593/)

0.163.1

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

Provide close reason to ASGI websocket as specified by ASGI 2.3

Contributed by [Kristján Valur Jónsson](https://github.com/kristjanvalur) via [PR #2639](https://github.com/strawberry-graphql/strawberry/pull/2639/)

0.163.0

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

This release adds support for list arguments in operation directives.

The following is now supported:

python
strawberry.directive(locations=[DirectiveLocation.FIELD])
def append_names(
value: DirectiveValue[str], names: List[str]
): note the usage of List here
return f"{value} {', '.join(names)}"


Contributed by [chenyijian](https://github.com/hot123s) via [PR #2632](https://github.com/strawberry-graphql/strawberry/pull/2632/)

0.162.0

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

Adds support for a custom field using the approach specified in issue [2168](abc).
Field Extensions may be used to change the way how fields work and what they return.
Use cases might include pagination, permissions or other behavior modifications.

python
from strawberry.extensions import FieldExtension


class UpperCaseExtension(FieldExtension):
async def resolve_async(
self,
next: Callable[..., Awaitable[Any]],
source: Any,
info: strawberry.Info,
**kwargs
):
result = await next(source, info, **kwargs)
return str(result).upper()


strawberry.type
class Query:
strawberry.field(extensions=[UpperCaseExtension()])
async def string(self) -> str:
return "This is a test!!"


graphql
query {
string
}


json
{
"string": "THIS IS A TEST!!"
}


Contributed by [Erik Wrede](https://github.com/erikwrede) via [PR #2567](https://github.com/strawberry-graphql/strawberry/pull/2567/)

Page 31 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.