TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learnings from Redesigning Our GraphQL API

9 点作者 gmontard超过 5 年前

1 comment

karmakaze超过 5 年前
Using interfaces rather than null fields seems worthwhile for sets of fields. If there are several fields that could be missing for independent reasons there would be many subtypes complicating the matter.<p>As for the `favoriteToy` suggesting, I would much prefer the original association to the toy collection with the default ordering being by preference where limiting it to one returns the favorite and otherwise have a uniform way to query for more.