I have just started learning graphql and I created a query that returns a list of first 10 closed issues along with some attributes. To my surprise, the response objects in JSON that I get are sometimes empty and sometimes they are non empty. The response is random.I have also tested with postman. Since I am mapping the json response to Java classes using jackson and performing some operations, exceptions are thrown when handling empty objects.
1)Basically, I want a non-empty objects of closed issues. Is anything wrong in the query? If yes, can somebody tell the correct query?
2) Also, I would like to know the logic behind returning empty node objects
Query Used
{
search(first: 20, type: ISSUE, query: "created:<2019-09-21 state:closed") {
issueCount
edges {
node {
... on Issue {
createdAt
closedAt
title
url
repository {
name
}
}
}
}
}
}
Response 1
{
"data": {
"search": {
"issueCount": 92339271,
"edges": [
{
"node": {
"createdAt": "2019-09-20T23:59:57Z",
"closedAt": "2019-09-21T19:59:32Z",
"title": "MJPEG stream won't open",
"url": "https://github.com/mpv-player/mpv/issues/6964",
"repository": {
"name": "mpv"
}
}
},
{
"node": {
"createdAt": "2019-09-20T23:59:50Z",
"closedAt": "2019-09-21T01:19:39Z",
"title": "Upgrade from v0.5.0 to v0.6.0 with attached volume failed",
"url": "https://github.com/longhorn/longhorn/issues/745",
"repository": {
"name": "longhorn"
}
}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {
"createdAt": "2019-09-20T23:58:52Z",
"closedAt": "2019-09-21T01:55:15Z",
"title": "bad linkage",
"url": "https://github.com/signalapp/Signal-Desktop/issues/3608",
"repository": {
"name": "Signal-Desktop"
}
}
},
{
"node": {}
},
{
"node": {
"createdAt": "2019-09-20T23:58:36Z",
"closedAt": "2019-09-21T00:57:54Z",
"title": "Breaks Some Links on Firefox for Mac",
"url": "https://github.com/duckduckgo/duckduckgo-privacy-extension/issues/416",
"repository": {
"name": "duckduckgo-privacy-extension"
}
}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {
"createdAt": "2019-09-20T23:56:11Z",
"closedAt": "2019-09-23T18:43:30Z",
"title": "ci: upload coverage reports from GitHub Actions",
"url": "https://github.com/hyperledger/aries-framework-go/issues/314",
"repository": {
"name": "aries-framework-go"
}
}
},
{
"node": {}
},
{
"node": {
"createdAt": "2019-09-20T23:56:07Z",
"closedAt": "2019-09-21T02:53:35Z",
"title": "0xxx.ws",
"url": "https://github.com/NanoMeow/QuickReports/issues/1885",
"repository": {
"name": "QuickReports"
}
}
}
]
}
}
}
Response 2
{
"data": {
"search": {
"issueCount": 92339271,
"edges": [
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {
"createdAt": "2019-09-20T23:58:36Z",
"closedAt": "2019-09-21T00:57:54Z",
"title": "Breaks Some Links on Firefox for Mac",
"url": "https://github.com/duckduckgo/duckduckgo-privacy-extension/issues/416",
"repository": {
"name": "duckduckgo-privacy-extension"
}
}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
},
{
"node": {}
}
]
}
}
}