Skip to content
Snippets Groups Projects

Fix errors in GraphQL Todos API due to missing TargetTypeEnum values

Merged Luke Duncalfe requested to merge 34757-bugfix-graphql-missing-todo-types into master
All threads resolved!

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

Availability and Testing

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Merge request pipeline #92435547 passed with warnings

Merge request pipeline passed with warnings for a51ed1c4

Test coverage 82.45% from 2 jobs

Merged by Jan ProvaznikJan Provaznik 5 years ago (Oct 30, 2019 12:04pm UTC)

Merge details

Pipeline #92541154 failed

Pipeline: omnibus-gitlab-mirror

#92547719

    Pipeline failed for 01fd6f35 on master

    Test coverage 67.63% from 2 jobs
    4 environments impacted.

    Activity

    Filter activity
    • Approvals
    • Assignees & reviewers
    • Comments (from bots)
    • Comments (from users)
    • Commits & branches
    • Edits
    • Labels
    • Lock status
    • Mentions
    • Merge request status
    • Tracking
  • Reviewer roulette

    Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.

    To spread load more evenly across eligible reviewers, Danger has randomly picked a candidate for each review slot. Feel free to override this selection if you think someone else would be better-suited, or the chosen person is unavailable.

    Once you've decided who will review this merge request, mention them as you normally would! Danger does not (yet?) automatically notify them for you.

    Category Reviewer Maintainer
    backend Doug Stull (@dstull) Nick Thomas (@nick.thomas)

    Generated by 🚫 Danger

    Edited by 🤖 GitLab Bot 🤖
  • Luke Duncalfe added 1 commit

    added 1 commit

    • 6a53268b - Fix errors in GraphQL TodosQuery

    Compare with previous version

  • Patrick Derichs
  • Patrick Derichs mentioned in merge request !19068 (merged)

    mentioned in merge request !19068 (merged)

  • Patrick Derichs mentioned in merge request !18998 (closed)

    mentioned in merge request !18998 (closed)

  • Luke Duncalfe mentioned in issue #34948

    mentioned in issue #34948

  • Luke Duncalfe changed the description

    changed the description

  • Luke Duncalfe resolved all threads

    resolved all threads

  • Luke Duncalfe
  • Luke Duncalfe added 103 commits

    added 103 commits

    Compare with previous version

  • mentioned in issue #34951 (closed)

  • mentioned in issue #34972 (closed)

  • Luke Duncalfe added 103 commits

    added 103 commits

    Compare with previous version

  • Luke Duncalfe added 102 commits

    added 102 commits

    Compare with previous version

  • Luke Duncalfe resolved all threads

    resolved all threads

  • Luke Duncalfe added 1 commit

    added 1 commit

    • 36c5f949 - Fix errors in GraphQL TodosQuery

    Compare with previous version

  • Author Maintainer

    Hi @digitalmoksha 👋 Could you please give this MR its first review? Thank you!

  • @.luke LGTM! 🚀 Nice job on splitting out the EE portion

  • Brett Walker mentioned in merge request !19257 (merged)

    mentioned in merge request !19257 (merged)

  • Luke Duncalfe added 167 commits

    added 167 commits

    Compare with previous version

  • Author Maintainer

    @jprovaznik Could you please give this MR a maintainer review? Thank you!

  • Jan Provaznik approved this merge request

    approved this merge request

  • Thanks @.luke, LGTM 👍

  • merged

  • Jan Provaznik mentioned in commit 01fd6f35

    mentioned in commit 01fd6f35

  • This merge request has been deployed to the GitLab.com environment gstg in GitLab auto-deploy version 12.5.201910311210-d5886f651a4.3ea7cde5d39.

    A list of all the deployed commits can be found here.


    🤖 If this message is incorrect, please create an issue in the Release Tools project.

  • This merge request has been deployed to the GitLab.com environment gprd-cny in GitLab auto-deploy version 12.5.201910312010-60c5d4225eb.efb9aedada9.

    A list of all the deployed commits can be found here.


    🤖 If this message is incorrect, please create an issue in the Release Tools project.

  • added workflowcanary label and removed workflowstaging label

  • This merge request has been deployed to the GitLab.com environment gprd in GitLab auto-deploy version 12.5.201911051208-6ed176c0af2.b8eace52b50.

    A list of all the deployed commits can be found here.


    🤖 If this message is incorrect, please create an issue in the Release Tools project.

  • added workflowproduction label and removed workflowcanary label

  • 🤖 GitLab Bot 🤖 changed the description

    changed the description

  • 🤖 GitLab Bot 🤖 added groupproduct planning label and removed 1 deleted label

    added groupproduct planning label and removed 1 deleted label

  • Please register or sign in to reply
    Loading