Fix errors in GraphQL Todos API due to missing TargetTypeEnum values
What does this MR do?
Fixes missing target types in TargetTypeEnum
and separates the
EE-specific types.
Adds calls_gitaly
for the TodoType#body
field, as an error is raised
when requesting the todo.body field
for a Commit
Todo
:
RuntimeError (Gitaly is called for field 'body' on Types::TodoType
- please either specify a constant complexity or add
`calls_gitaly: true` to the field declaration)
When the Todo
(a polymorphic model) has a target_type
of Commit
,
requesting the body
field calls Gitaly (Todo#body
calls
Todo#target
which fetches the Commit
from Gitaly) and we get the
above error.
I've set calls_gitaly: true
for the TodoType#body
field (affecting
all Todos, regardless of the target_type
) in order to avoid the error,
while we work out a better solution.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation created/updated or follow-up review issue created
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
Edited by 🤖 GitLab Bot 🤖
Merge request reports
Activity
Please register or sign in to reply