Skip to content

Avoid some fields to be null in Snippet BlobViewer GraphQL definition

What does this MR do?

When the blob is binary, there are some components in Types::Snippets::BlobViewerType that can be nil. Specifically the fields collapse and too_large.

Nevertheless, in the definition of this type we set them as null: false. Since they're boolean types we can force the response to be always boolean.

This MR also fixes #216370 (closed) where the plainData field is called, but the calls_gitaly property is not set for snippets which size is above 10MB and we need to perform an extra query to retrieve its whole content.

Fixes #216338 (closed) and #216370 (closed)

Does this MR meet the acceptance criteria?

Conformity

Edited by 🤖 GitLab Bot 🤖

Merge request reports