Parent
Represents a parameter holding the parent resolver’s value.
This can be used when defining a resolver on a type when the parent isn’t expected to return the type itself.
Example:
import strawberryfrom dataclasses import dataclass
@dataclassclass UserRow: id_: str
@strawberry.typeclass User: @strawberry.field @staticmethod async def name(parent: strawberry.Parent[UserRow]) -> str: return f"User Number {parent.id_}"
@strawberry.typeclass Query: @strawberry.field def user(self) -> User: return UserRow(id_="1234")