Releases: strawberry-graphql/strawberry
Releases · strawberry-graphql/strawberry
Strawberry 0.12.0
This releases adds support for ASGI 3.0
from strawberry.asgi import GraphQL
from starlette.applications import Starlette
graphql_app = GraphQL(schema_module.schema, debug=True)
app = Starlette(debug=True)
app.add_route("/graphql", graphql_app)
app.add_websocket_route("/graphql", graphql_app)
Strawberry 0.11.0
Added support for optional fields with default arguments in the GraphQL schema when default arguments are passed to the resolver.
Example:
@strawberry.type
class Query:
@strawberry.field
def hello(self, info, name: str = "world") -> str:
return name
type Query {
hello(name: String = "world"): String
}
Strawberry 0.10.0
Fixed issue that was prevent usage of InitVars.
Now you can safely use InitVar to prevent fields from showing up in the schema:
@strawberry.type
class Category:
name: str
id: InitVar[str]
@strawberry.type
class Query:
@strawberry.field
def category(self, info) -> Category:
return Category(name="example", id="123")
Strawberry 0.9.1
Fixed logo on PyPI
Strawberry 0.9.0
Added support for passing resolver functions
def resolver(root, info, par: str) -> str:
return f"hello {par}"
@strawberry.type
class Query:
example: str = strawberry.field(resolver=resolver)
Also we updated some of the dependencies of the project
Strawberry 0.8.0
Added support for renaming fields. Example usage:
@strawberry.type
class Query:
example: str = strawberry.field(name='test')
Strawberry 0.7.0
Added support for declaring interface by using @strawberry.interface
Example:
@strawberry.interface
class Node:
id: strawberry.ID
Strawberry 0.6.0
This changes field to be lazy by default, allowing to use circular dependencies
when declaring types.
Strawberry 0.5.6
Improve listing on pypi.org