Open OlehDziuba opened 1 year ago
Using computable properties or methods of the pydantic model instead of strawberry.field
strawberry.field
class User(BaseModel): first_name: str last_name: str def full_name(self, separator: str) -> str: return f"{self.first_name}{separator}{self.last_name}" @strawberry.experimental.pydantic.type(model=User, all_fields=True) class UserType: pass
Now the scheme looks like this:
type UserType{ first_name: String! last_name: String! }
But it would be convenient to have a scheme that looks like
type UserType{ first_name: String! last_name: String! full_name(separator: String!): String! }
I imagine this is now solved by https://strawberry.rocks/docs/guides/accessing-parent-data...
Feature Request Type
Description
Using computable properties or methods of the pydantic model instead of
strawberry.field
Now the scheme looks like this:
But it would be convenient to have a scheme that looks like
Upvote & Fund