import strawberry
@strawberry.type
class User:
name: str
age: int
@strawberry.type
class Query:
@strawberry.field
def user(self) -> User:
return User(name="Patrick", age=100)
schema = strawberry.Schema(query=Query)
Learn how to create GraphQL API using Strawberry
View documentation 📝Strawberry's friendly API allows to create GraphQL API rather quickly, the debug server makes it easy to quickly test and debug.
Django and ASGI support allow to have your API deployed in production in matter of minutes
Do you want to receive the latest updates on Strawberry? Subscribe to our newsletter!