为什么我们在GraphQL中使用现场解析器?
因此,我一直在关注Ben Awad的14小时GraphQl和React系列,并且遇到了现场解析器,我对它们的用例感到有些困惑。我知道可以使用现场解析器来修改服务器中的某些数据。在这种特殊情况下,他使用它来切片大量用户帖子的文本,因此在这种情况下,我猜想随着数据的增长,获取大量数据很耗时,因此可以使用现场解析器来修改适当的数据以优化。服务器。我对吗?因为这对我来说很有意义,这就是我的理解方式。他们提供的东西还有更多吗?
So I have been following Ben Awad's 14 hr GraphQL and React series and I came across field resolvers and I have been a little confused about their use-case. I understand that field resolvers can be used to modify a certain data in the server. In this particular case, he uses it to slice the text of huge user posts, so in this context I am guessing that fetching large chunks of data is time consuming as the data grows, so field resolvers can be used to modify appropriate data to optimise the server. Am i right? Because this makes sense to me and this is how i understand it. Is there more to what they offer or is this it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论