pypi strawberry-graphql 0.233.0
🍓 0.233.0

latest releases: 0.248.1, 0.248.0, 0.247.2...
5 months ago

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

Don't miss a new strawberry-graphql release

NewReleases is sending notifications on new releases.