Skip to content
代码片段 群组 项目
未验证 提交 3dabbf8b 编辑于 作者: Michael Kozono's avatar Michael Kozono 提交者: GitLab
浏览文件

Document that #sync is generally fine in mutations

上级 2fe05876
No related branches found
No related tags found
无相关合并请求
...@@ -154,6 +154,8 @@ def catalog_url ...@@ -154,6 +154,8 @@ def catalog_url
end end
``` ```
We commonly use `#sync` in a mutation after finding a record with `GitlabSchema.find_by_gid` or `.object_from_id`, as those methods return the result in a batch loader wrapper. Mutations are executed serially, so batch loading is not necessary and the object can be evaluated immediately.
## Testing ## Testing
Ideally, do all your testing using request specs, and using `Schema.execute`. If Ideally, do all your testing using request specs, and using `Schema.execute`. If
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册