T09 API合约设计 ⭐⭐⭐ 📋 0 次复制

API合约设计 - Prompt 2

请为我设计GraphQL API。

📝 完整 Prompt
请为我设计GraphQL API。

数据模型:
- User (id, name, email, posts)
- Post (id, title, content, author)

需要的查询:
1. 获取用户信息
2. 获取用户的所有文章
3. 获取文章及其作者

需要的mutations:
1. 创建用户
2. 创建文章
3. 更新文章

请提供:
1. Schema定义
2. Query和Mutation示例
3. 订阅示例(如果适用)
← 返回列表

📎 同任务下的其他 Prompt