Skip to main content
Create app.py:
Run it:
The result contains GraphQL-shaped data:
@Type turns the annotated class into a GraphQL object type. @Query applies the same field discovery contract while marking the class as an operation root. @Field makes the method a resolver-backed field; its parameter becomes a GraphQL argument and its return annotation becomes the output type. The repository continuously executes this example from docs/snippets/quickstart.py.

Run the playground

Serve the schema and explore it in a browser.