how to get issue types by Github App? #142232
Unanswered
lvhaiqiang-ola
asked this question in
API and Webhooks
Replies: 1 comment
-
The error message you’re receiving indicates that the issueTypes field does not exist on the Organization type in GitHub’s GraphQL API. This suggests that either the field is not available or there is an issue with the query structure. Here’s a breakdown of the issues and steps to fix it:
Example Query for Issues in a Repository To query issues or issue types (assuming you’re looking for issues themselves or custom issue types, a newer feature of GitHub), you would have to structure the query differently, like this: query {
repository(owner: "olaola-chat", name: "your-repo-name") {
issues(first: 10) {
pageInfo {
endCursor
hasNextPage
}
nodes {
id
title
number
labels(first: 5) {
nodes {
name
}
}
createdAt
state
}
}
}
} This query retrieves the first 10 issues from a repository, along with their labels, creation date, and state. Steps to resolve:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
how to get issue types by Github App,use GraphQL Api;
i am use Github app token request GraphQL Api,response error
request params:
{
"query":"query { organization(login: "olaola-chat"){issueTypes(first: 10) {pageInfo{endCursor,hasNextPage},nodes {id,name,isEnabled,isPrivate}}}}"
}
headers:
Authorization:bearer ghs_xxx (github app token)
GraphQL-Features:issue_types
response:
{
"errors": [
{
"path": [
"query",
"organization",
"issueTypes"
],
"extensions": {
"code": "undefinedField",
"typeName": "Organization",
"fieldName": "issueTypes"
},
"locations": [
{
"line": 1,
"column": 44
}
],
"message": "Field 'issueTypes' doesn't exist on type 'Organization'"
}
]
}
Beta Was this translation helpful? Give feedback.
All reactions