Archicise
Exercise

Design a GraphQL API for Content Platform

Design a GraphQL API for a content management platform with articles, authors, categories, and comments.

Functional Requirements

  • Article CRUD with rich content
  • Author profiles and attribution
  • Categories and tagging
  • Comments and moderation
  • Search and filtering
  • Content versioning and drafts

Non-Functional Requirements

  • Efficient nested data fetching
  • Query complexity limits
  • Caching strategies
  • Real-time subscriptions
  • File upload handling

Questions to Consider

  • How do you prevent expensive nested queries?
  • What's the best pagination approach in GraphQL?
  • How do you handle authorization at field level?
Your Solution

Schema Design

Design the GraphQL schema with types, queries, and mutations. Consider type relationships, interfaces, unions, and naming conventions.