Skip to content
代码片段 群组 项目
未验证 提交 9180f791 编辑于 作者: Luke Duncalfe's avatar Luke Duncalfe 提交者: GitLab
浏览文件

Merge branch 'mkozono-master-patch-39083' into 'master'

Document that .sync is generally fine in mutations

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/158119



Merged-by: default avatarLuke Duncalfe <lduncalfe@gitlab.com>
Approved-by: default avatarcharlie ablett <cablett@gitlab.com>
Approved-by: default avatarLuke Duncalfe <lduncalfe@gitlab.com>
Co-authored-by: default avatarMichael Kozono <mkozono@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -154,6 +154,8 @@ def catalog_url
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
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.
先完成此消息的编辑!
想要评论请 注册