Strawberry-graphql

Latest version: v0.235.0

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

Scan your dependencies

Page 57 of 122

0.110.0

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

This release adds support for passing a custom name to schema directives fields,
by using `strawberry.directive_field`.

python
import strawberry


strawberry.schema_directive(locations=[Location.FIELD_DEFINITION])
class Sensitive:
reason: str = strawberry.directive_field(name="as")
real_age_2: str = strawberry.directive_field(name="real_age")


strawberry.type
class Query:
first_name: str = strawberry.field(
directives=[Sensitive(reason="GDPR", real_age_2="42")]
)


should return:

graphql
type Query {
firstName: String! sensitive(as: "GDPR", real_age: "42")
}


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

0.109.1

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

0.109.0

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

Changed the location of `UNSET` from `arguments.py` to `unset.py`. `UNSET` can now also be imported directly from `strawberry`. Deprecated the `is_unset` method in favor of the builtin `is` operator:

python
from strawberry import UNSET
from strawberry.arguments import is_unset old

a = UNSET

assert a is UNSET new
assert is_unset(a) old

Further more a new subsection to the docs was added explaining this.

Contributed by [Dominique Garmier](https://github.com/DominiqueGarmier) via [PR #1813](https://github.com/strawberry-graphql/strawberry/pull/1813/)

0.108.3

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

Fixes a bug when converting pydantic models with NewTypes in a List.
This no longers causes an exception.

python
from typing import List, NewType
from pydantic import BaseModel
import strawberry

password = NewType("password", str)


class User(BaseModel):
passwords: List[password]


strawberry.experimental.pydantic.type(User)
class UserType:
passwords: strawberry.auto


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

0.108.2

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

Fixes mypy type inference when using strawberry.experimental.pydantic.input
and strawberry.experimental.pydantic.interface decorators

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

0.108.1

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

Refactoring: Move enum deserialization logic from convert_arguments to CustomGraphQLEnumType

Contributed by [Paulo Costa](https://github.com/paulo-raca) via [PR #1765](https://github.com/strawberry-graphql/strawberry/pull/1765/)

Page 57 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.