Releases: strawberry-graphql/strawberry
馃崜 0.235.0
This release adds a new configuration to disable field suggestions in the error
response.
@strawberry.type
class Query:
name: str
schema = strawberry.Schema(
query=Query, config=StrawberryConfig(disable_field_suggestions=True)
)
Trying to query { nam }
will not suggest to query name
instead.
Releases contributed by @patrick91 via #3537
馃崜 0.234.3
Fixes a bug where pydantic models as the default value for an input did not print the proper schema.
See this issue.
馃崜 0.234.2
This release fixes an issue when trying to retrieve specialized type vars from a
generic type that has been aliased to a name, in cases like:
@strawberry.type
class Fruit(Generic[T]): ...
SpecializedFruit = Fruit[str]
Releases contributed by @bellini666 via #3535
馃崜 0.234.1
Improved error message when supplying GlobalID with invalid or unknown type name component
Releases contributed by @diesieben07 via #3533
馃崜 0.234.0
This release separates the relay.ListConnection
logic that calculates the
slice of the nodes into a separate function.
This allows for easier reuse of that logic for other places/libraries.
The new function lives in the strawberry.relay.utils
and can be used by
calling SliceMetadata.from_arguments
.
This has no implications to end users.
Releases contributed by @bellini666 via #3530
馃崜 0.233.3
This release fixes a typing issue where trying to type a root
argument with
strawberry.Parent
would fail, like in the following example:
import strawberry
@strawberry.type
class SomeType:
@strawberry.field
def hello(self, root: strawberry.Parent[str]) -> str:
return "world"
This should now work as intended.
Releases contributed by @bellini666 via #3529
馃崜 0.233.2
This release fixes an introspection issue when requesting isOneOf
on built-in
scalars, like String
.
Releases contributed by @patrick91 via #3528
馃崜 0.233.1
This release exposes get_arguments
in the schema_converter module to allow
integrations, such as strawberry-django, to reuse that functionality if needed.
This is an internal change with no impact for end users.
Releases contributed by @bellini666 via #3527
馃崜 0.233.0
This release refactors our Federation integration to create types using
Strawberry directly, instead of using low level types from GraphQL-core.
The only user facing change is that now the info
object passed to the
resolve_reference
function is the strawberry.Info
object instead of the one
coming coming from GraphQL-core. This is a breaking change for users that
were using the info
object directly.
If you need to access the original info
object you can do so by accessing the
_raw_info
attribute.
import strawberry
@strawberry.federation.type(keys=["upc"])
class Product:
upc: str
@classmethod
def resolve_reference(cls, info: strawberry.Info, upc: str) -> "Product":
# Access the original info object
original_info = info._raw_info
return Product(upc=upc)
Releases contributed by @patrick91 via #3525
馃崜 0.232.2
This release fixes an issue that would prevent using lazy aliased connections to
annotate a connection field.
For example, this should now work correctly:
# types.py
@strawberry.type
class Fruit: ...
FruitConnection: TypeAlias = ListConnection[Fruit]
# schema.py
@strawberry.type
class Query:
fruits: Annotated["FruitConnection", strawberry.lazy("types")] = (
strawberry.connection()
)
Releases contributed by @bellini666 via #3524