Skip to content

Commit d1393db

Browse files
authored
Merge pull request github#20304 from shiftkey/patch-2
Correct return type on `addProjectV2DraftIssue` sample
2 parents 3083924 + c15cc40 commit d1393db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ The following example will add a draft issue to your project. Replace `PROJECT_I
489489
curl --request POST \
490490
--url https://api.github.com/graphql \
491491
--header 'Authorization: Bearer <em>TOKEN</em>' \
492-
--data '{"query":"mutation {addProjectV2DraftIssue(input: {projectId: "<em>PROJECT_ID</em>" title: "<em>TITLE</em>" body: "<em>BODY</em>"}) {item {id}}}"}'
492+
--data '{"query":"mutation {addProjectV2DraftIssue(input: {projectId: "<em>PROJECT_ID</em>" title: "<em>TITLE</em>" body: "<em>BODY</em>"}) {projectItem {id}}}"}'
493493
```
494494
{% endcurl %}
495495

@@ -498,7 +498,7 @@ curl --request POST \
498498
gh api graphql -f query='
499499
mutation {
500500
addProjectV2DraftIssue(input: {projectId: "<em>PROJECT_ID</em>" title: "<em>TITLE</em>" body: "<em>BODY</em>"}) {
501-
item {
501+
projectItem {
502502
id
503503
}
504504
}
@@ -512,7 +512,7 @@ The response will contain the node ID of the newly created draft issue.
512512
{
513513
"data": {
514514
"addProjectV2ItemById": {
515-
"item": {
515+
"projectItem": {
516516
"id": "PVTI_lADOANN5s84ACbL0zgBbxFc"
517517
}
518518
}

0 commit comments

Comments
 (0)