i’ve been trying to search repositories using the GraphQl API , and apollo-client in a next.js app
with this query :
query Search($query:String!,$type:SearchType!){
search(type:$type,query:$query,first:10){
nodes{
... on Repository{
description,
url,
name,
... on RepositoryInfo{
openGraphImageUrl
},
issues(states:OPEN){
totalCount
},
stargazers{
totalCount
},
labels(first:5){
totalCount,
nodes{
color,
name,
url
}
}
}
}
}
}
but i receive this as response :
{
type: "FORBIDDEN",
path:["search", "nodes", 0, "labels"],
extensions: {saml_failure: false},
locations:[extensions: {saml_failure: false}],
message: "Resource not accessible by integration"
}
i also tried with this query from github api documentation https://developer.github.com/v4/guides/forming-calls/#example-query :
repository(owner:"octocat", name:"Hello-World") {
issues(last:20, states:CLOSED) {
edges {
node {
title
url
labels(first:5) {
edges {
node {
name
}
}
}
}
}
}
}
i tried with another client like graphql-request and is the same answer, by the way : both queries runs very well on the GraphQl explorer from github ,and now my question is : Why is this happening, is , and how i can get it solved ?