Query ProjectV2SingleSelectField with GraphQL not working #50253
Replies: 1 comment
-
Quite late to this post {
node(id: "node_id") {
... on ProjectV2Item {
id
databaseId
content {
... on DraftIssue {
title
body
}
}
}
}
} Here I am fetching the item and its content, the content can also be queried directly |
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
Bug
Body
Context
I've been experiencing what could be done with the GitHub GraphQL API and webhooks (especially for the new projects, called projects V2).
I get the body of the webhook sent by a private repo as a JSON file, and I run custom automation using some python scripts.
Here is an example (actually of part of it) of the webhook body i'm using:
The
field_node_id
refers to the string ID of the field edited in a project V2.In my python script, I need to know the value of that field.
To do that, I use 2 GraphQL requests.
The first one query the name of the field edited and the second one query the value thanks to its name.
I couldn't find a way to get the field value without the field name.
Here is the first GraphQL request, to query the field name:
The issue
Here is the response of to the query:
However, when I search "manually" for the field name, I can find it:
output:
The questions
What I'm sure of
It's not a permission issue, I've already tested it using the GitHub Explorer and other HTTP client.
Beta Was this translation helpful? Give feedback.
All reactions