diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js
index 4a10f231f1bd5e1120aedd43e4d79257c38d5d04..e85a1055e502f0e02bb0243f8c3d25f7451c6320 100644
--- a/lib/platform/github/index.js
+++ b/lib/platform/github/index.js
@@ -890,6 +890,11 @@ async function getOpenPrs() {
       };
       const res = JSON.parse((await get.post(url, options)).body);
       const prNumbers = [];
+      // istanbul ignore if
+      if (!res.data) {
+        logger.warn({ res }, 'No graphql res.data');
+        return {};
+      }
       for (const pr of res.data.repository.pullRequests.nodes) {
         // https://developer.github.com/v4/object/pullrequest/
         pr.displayNumber = `Pull Request #${pr.number}`;
@@ -986,6 +991,11 @@ async function getClosedPrs() {
       };
       const res = JSON.parse((await get.post(url, options)).body);
       const prNumbers = [];
+      // istanbul ignore if
+      if (!res.data) {
+        logger.warn({ res }, 'No graphql res.data');
+        return {};
+      }
       for (const pr of res.data.repository.pullRequests.nodes) {
         // https://developer.github.com/v4/object/pullrequest/
         pr.displayNumber = `Pull Request #${pr.number}`;