I’m trying to perform the following GraphQL query:
query($page_size: Int!, $cursor: String) {
viewer {
... on User {
pullRequests(first: $page_size, after: $cursor, states:OPEN) {
totalCount
nodes {
id
}
}
}
}
}
with these variables:
{
"cursor": null,
"page_size": 3
}
However, it always results in the following response:
{
"data": {
"viewer": {
"pullRequests": {
"totalCount": 7,
"nodes": [
null,
null,
null
]
}
}
},
"errors": [
{
"type": "FORBIDDEN",
"path": [
"viewer",
"pullRequests",
"nodes",
0
],
"locations": [
{
"line": 6,
"column": 9
}
],
"message": "Resource not accessible by integration"
},
{
"type": "FORBIDDEN",
"path": [
"viewer",
"pullRequests",
"nodes",
1
],
"locations": [
{
"line": 6,
"column": 9
}
],
The authorization is via an
Authorization: token <user's access token after app login>
I thought this was a permissions issue, but I tried giving the app Read permissions to pretty much everything and it still forbids me from accessing the Pull Requests data. However, the totalCount
field is returned successfully.
Am I doing something wrong? This query works perfectly on the Explorer