英文:
How to query project notes on Github using GraphQL?
问题
I found a project at the address https://github.com/delbaoliveira/website/projects/1. I am using the GitHub GraphQL API to retrieve the desired notes.
I also created a similar project, but the returned result is undefined. I suspect that the variable columnId
is incorrect.
So, how can I obtain the columnId
? Please help me!
英文:
I found a project at the address https://github.com/delbaoliveira/website/projects/1. I am using the GitHub GraphQL API to retrieve the desired notes.
I also created a similar project, but the returned result is undefined. I suspect that the variable columnId is incorrect.
So, how can I obtain the columnId
? Please help me!
答案1
得分: 0
你可以使用以下查询获取columnId
:
query {
repository(name: "website", owner: "delbaoliveira") {
project(number: 1) {
name
columns(first: 1) {
nodes {
id
name
}
}
}
}
}
但你也可以在没有columnId
的情况下获取列数据,像这样:
query {
repository(name: "website", owner: "delbaoliveira") {
project(number: 1) {
name
columns(first: 1) {
nodes {
name
cards {
nodes {
note
}
}
}
}
}
}
}
英文:
You can get columnId
with this query:
query {
repository(name: "website", owner: "delbaoliveira") {
project(number: 1) {
name
columns(first: 1) {
nodes {
id
name
}
}
}
}
}
But also you can go ahead and get column data without columnId
like this:
query {
repository(name: "website", owner: "delbaoliveira") {
project(number: 1) {
name
columns(first: 1) {
nodes {
name
cards {
nodes {
note
}
}
}
}
}
}
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论