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

0.42.5

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

Another small improvement for mypy, this should prevent mypy from crashing when it can't find a type

0.42.4

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

This release fixes another issue with mypy where it wasn't able to identify strawberry fields.
It also now knows that fields with resolvers aren't put in the __init__ method of the class.

0.42.3

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

This release type improves support for strawberry.field in mypy,
now we don't get `Attributes without a default cannot follow attributes with one`
when using strawberry.field before a type without a default.

0.42.2

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

Bugfix to allow the use of `UNSET` as a default value for arguments.

python
import strawberry
from strawberry.arguments import UNSET, is_unset


strawberry.type
class Query:
strawberry.field
def hello(self, name: Optional[str] = UNSET) -> str:
if is_unset(name):
return "Hi there"
return "Hi {name}"


schema = strawberry.Schema(query=Query)

result = schema.execute_async("{ hello }")
assert result.data == {"hello": "Hi there"}

result = schema.execute_async('{ hello(name: "Patrick" }')
assert result.data == {"hello": "Hi Patrick"}


SDL:

graphql
type Query {
hello(name: String): String!
}

0.42.1

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

This release improves mypy support for strawberry.field

0.42.0

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

* Completely revamped how resolvers are created, stored, and managed by
StrawberryField. Now instead of monkeypatching a `FieldDefinition` object onto
the resolver function itself, all resolvers are wrapped inside of a
`StrawberryResolver` object with the useful properties.
* `arguments.get_arguments_from_resolver` is now the
`StrawberryResolver.arguments` property
* Added a test to cover a situation where a field is added to a StrawberryType
manually using `dataclasses.field` but not annotated. This was previously
uncaught.

Page 97 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.