Skip to content

Releases: strawberry-graphql/strawberry

馃崜 0.227.3

01 May 20:45
Compare
Choose a tag to compare

This release adds an optimization to ListConnection such that only queries with
edges or pageInfo in their selected fields triggers resolve_edges.

This change is particularly useful for the strawberry-django extension's
ListConnectionWithTotalCount and the only selected field is totalCount. An
extraneous SQL query is prevented with this optimization.

Releases contributed by @euriostigue via #3480

馃崜 0.227.2

21 Apr 15:32
Compare
Choose a tag to compare

This release fixes a minor issue where the docstring for the relay util to_base64 described the return type incorrectly.

Releases contributed by @gbannerman via #3467

馃崜 0.227.1

20 Apr 21:52
Compare
Choose a tag to compare

This release fixes an issue where annotations on @strawberry.types were overridden
by our code. With release all annotations should be preserved.

This is useful for libraries that use annotations to introspect Strawberry types.

Releases contributed by @patrick91 via #3003

馃崜 0.227.0

19 Apr 21:15
Compare
Choose a tag to compare

This release improves the schema codegen, making it more robust and easier to
use.

It does this by introducing a directed acyclic graph for the schema codegen,
which should reduce the amount of edits needed to make the generated code work,
since it will be able to generate the code in the correct order (based on the
dependencies of each type).

Releases contributed by @patrick91 via #3116

馃崜 0.226.2

19 Apr 21:01
Compare
Choose a tag to compare

This release updates our Mypy plugin to add support for Pydantic >= 2.7.0

Releases contributed by @patrick91 via #3462

馃崜 0.226.1

19 Apr 18:49
Compare
Choose a tag to compare

This releases fixes a bug in the mypy plugin where the from_pydantic method
was not correctly typed.

Releases contributed by @Corentin-Br via #3368

馃崜 0.226.0

17 Apr 16:47
Compare
Choose a tag to compare

Starting with this release, any error raised from within schema
extensions will abort the operation and is returned to the client.

This corresponds to the way we already handle field extension errors
and resolver errors.

This is particular useful for schema extensions performing checks early
in the request lifecycle, for example:

class MaxQueryLengthExtension(SchemaExtension):
    MAX_QUERY_LENGTH = 8192

    async def on_operation(self):
        if len(self.execution_context.query) > self.MAX_QUERY_LENGTH:
            raise StrawberryGraphQLError(message="Query too large")
        yield

馃崜 0.225.1

15 Apr 14:11
Compare
Choose a tag to compare

This change fixes GET request queries returning a 400 if a content_type header is supplied

Releases contributed by @vethan via #3452

馃崜 0.225.0

14 Apr 21:57
Compare
Choose a tag to compare

This release adds support for using FastAPI APIRouter arguments in GraphQLRouter.

Now you have the opportunity to specify parameters such as tags, route_class,
deprecated, include_in_schema, etc:

import strawberry

from fastapi import FastAPI
from strawberry.fastapi import GraphQLRouter


@strawberry.type
class Query:
    @strawberry.field
    def hello(self) -> str:
        return "Hello World"


schema = strawberry.Schema(Query)

graphql_app = GraphQLRouter(schema, tags=["graphql"])

app = FastAPI()
app.include_router(graphql_app, prefix="/graphql")

Releases contributed by @nparamonov via #3442

馃崜 0.224.2

13 Apr 16:20
Compare
Choose a tag to compare

This releases fixes a bug where schema extensions where not running a LIFO order.

Releases contributed by @nrbnlulu via #3416