Time window 24 hours. Suggested effort about 4 hours.
Context
A cooking site wants to move its recipe catalogue behind a GraphQL API so its web and mobile clients can ask for exactly the fields they need.
Core requirements
- Schema with
Recipe(id, title, description, minutes, servings, tags, ingredients, steps, author) andIngredient(name, quantity, unit). - Seed at least 25 recipes on startup from a JSON file you commit.
- Query
recipes(filter, first, after)with cursor pagination (Relay-styleedgesandpageInfo). Filters: tag, maximum minutes, text search on title, and "contains ingredient". - Query
recipe(id). - Mutations
createRecipe,updateRecipe,deleteRecipewith input validation. - Errors come back as typed results or GraphQL errors with useful messages, never stack traces.
Acceptance criteria
- Paginating through all recipes with
first: 5visits each recipe exactly once, in a stable order. - Fetching a page of recipes with their authors does not issue one query per recipe (batch or join; explain how).
- Validation rejects empty titles, non-positive minutes or servings, and empty ingredient lists.
- Tests run real GraphQL operations against the schema.
Stretch goals (optional)
- API-key auth where only the author may update or delete their recipe.
- A query depth or complexity limit.
- A subscription for newly created recipes.
Constraints
- Any GraphQL server. Suggested: Apollo Server or GraphQL Yoga (Node), Strawberry (Python), gqlgen (Go).
Deliverables (every project)
- Source code committed in this repository (the grader diffs against the first commit).
README.mdthat replaces the stub, with: how to install, run and test it (copy-pasteable commands); the decisions and trade-offs you made; what you would do next with more time; and a short note on how you used the AI agent (what you delegated, what you checked or rewrote).- Automated tests that run with a single command (
npm test,pytest,go test ./...orcargo test). - No secrets in the repository. Anything configurable reads from environment variables with safe defaults.
Ground rules
- The 24-hour clock is a window, not a workload. Stop at roughly the suggested effort, then write down what you would do next. A small, finished, tested core beats a large unfinished one.
- Use the AI agent as much or as little as you like: every prompt is recorded and the report shows how it was used. You are judged on the result and on whether you understood and verified what the agent produced.
- The work is yours. PraxisAI uses it only to produce your assessment report.