Github GraphQL v4 truncating text Field of large Blob

I’m trying to download a file from Github using the GraphQL API v4. The file is a few megabytes in size. Currently the API appears to truncate the returned text field for the Blob, but still returns some text and the other field (byteSize) successfully.

The API version 3 documents the size restriction of certain API request, but the V4 does not appear to this.

Is there a size limit for text in Blobs for the GraphQL API? If so what is it?

Also if anyone can suggest an API driven method for retriving a Blob, additional thanks.

A demostration Python program which displays this behaviour can be found here:

I’ve created a target file: which is slightly too big for the API to handle.

Blob object reference:

API v3 request size limit reference


I can confirm - same problem for retrieving gists with text over 1 MB.
This query

const getGist = () => `
  query ($name: String!) {
    viewer {
      gist(name: $name) {
        files {

Truncates the text field. The regular API does not.

console.log(content.size, content.text.length);  // 1187172,  921600