-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documentedhacktoberfestIssues for participation in HacktoberfestIssues for participation in Hacktoberfest
Description
What happened?
When performing an UpdateProjectV2ItemFieldValue mutation the response returns with a ProjectV2FieldValue has the wrong arguments error
var updateStatusQuery = new Mutation().UpdateProjectV2ItemFieldValue(
new UpdateProjectV2ItemFieldValueInput {
FieldId = new ID("xxxxxxx_xxxxxxx-xxxxxxxxxxxx"),
ItemId = new ID("xxxxxx_xxxxxxxxx-xxxxxxxxxxxx"),
ProjectId = new ID("xxx_xxxxxxx-xxxxxxx"),
ClientMutationId = "abc123",
Value = new ProjectV2FieldValue {
SingleSelectOptionId = "8499aa9c"
}
})
.Select(p => p.ProjectV2Item.Id);
var updateStatusRes = await connection.Run(updateStatusQuery);
Below is the generated query:
{ "query":"mutation {
updateProjectV2ItemFieldValue(input:{
projectId:\"xxx_xxxxxxx-xxxxxxxs\",
itemId:\"xxxxxx_xxxxxxxxx-xxxxxxxxxxxx\",
fieldId:\"xxxxxxx_xxxxxxx-xxxxxxxxxxxx\",
value:{
text:null,
number:null,
date:null,
singleSelectOptionId:\"8499aa9c\",
iterationId:null }
,clientMutationId:\"abc123\"})
{projectV2Item{id}}}","variables":null}
It appears that the value object ProjectV2FieldValue
cannot be passed with more than one property per request. Performing a request without the additional null properties does succeed:
{ "query":"mutation {
updateProjectV2ItemFieldValue(input:{
projectId:\"xxx_xxxxxxx-xxxxxxxs\",
itemId:\"xxxxxx_xxxxxxxxx-xxxxxxxxxxxx\",
fieldId:\"xxxxxxx_xxxxxxx-xxxxxxxxxxxx\",
value:{
singleSelectOptionId:\"8499aa9c\",
}
,clientMutationId:\"abc123\"})
{projectV2Item{id}}}","variables":null}
Thanks
Versions
Relevant log output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Dan-Albrecht, PieterjanDeClippel, tamararivera, awright18, ArtemCherniavsky and 1 more
Metadata
Metadata
Assignees
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documentedhacktoberfestIssues for participation in HacktoberfestIssues for participation in Hacktoberfest
Type
Projects
Status
🔥 Backlog