-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add template * Create setup_graphql.md * Update setup_graphql.md * Some prototype * Improve * Done * Fix * isort * Remove some stuff
- Loading branch information
Showing
6 changed files
with
178 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
## GraphQL get some ID's instriction | ||
You can find this many of id's with only | ||
with GraphQL requests ([use Explorer](https://docs.github.com/ru/graphql/overview/explorer)): | ||
|
||
|
||
```graphql | ||
# This query return scrum project's id's (PROJECT_NODE_ID). Bot only can add issue only to one project | ||
{organization(login: "GH_ORGANIZATION_NICKNAME") { | ||
projectsV2(first: 100) { | ||
edges { | ||
node { | ||
title | ||
id | ||
public | ||
}}}}} | ||
``` | ||
```graphql | ||
# Use PROJECT_NODE_ID for next request. | ||
{node(id: "PROJECT_NODE_ID") { | ||
... on ProjectV2 { | ||
fields(first: 20) { | ||
nodes { | ||
... on ProjectV2Field { | ||
id | ||
name | ||
} | ||
... on ProjectV2IterationField { | ||
id | ||
name | ||
configuration { | ||
iterations { | ||
startDate | ||
id | ||
} | ||
} | ||
} | ||
... on ProjectV2SingleSelectField { | ||
id | ||
name | ||
options { | ||
id | ||
name | ||
}}}}}}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,68 @@ | ||
mutation AddToScrum($projectId: ID!, $contentId: ID!) { | ||
addProjectV2ItemById(input: {projectId: $projectId, contentId: $contentId}) { | ||
item { | ||
id | ||
addProjectV2ItemById(input: {projectId: $projectId, contentId: $contentId}) { | ||
item { | ||
id | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
query GetIssueDeadlineField($issueId: ID!) { | ||
node(id: $issueId) { | ||
... on Issue { | ||
id | ||
title | ||
projectItems(first: 10) { | ||
totalCount | ||
nodes { | ||
id | ||
fieldValues(first: 15, orderBy: {field: POSITION, direction: DESC}) { | ||
nodes { | ||
... on ProjectV2ItemFieldDateValue { | ||
id | ||
date | ||
field { | ||
... on ProjectV2Field { | ||
id | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
mutation SetFieldDateValue($projectId: ID!, $itemId: ID!, $fieldId: ID!, $newDate: Date!){ | ||
updateProjectV2ItemFieldValue( | ||
input: { | ||
projectId: $projectId, | ||
itemId: $itemId, | ||
fieldId: $fieldId, | ||
value: {date: $newDate} | ||
} | ||
) { | ||
projectV2Item { | ||
createdAt | ||
updatedAt | ||
fieldValues(first: 15, orderBy: {field: POSITION, direction: DESC}) { | ||
nodes { | ||
... on ProjectV2ItemFieldDateValue { | ||
id | ||
date | ||
field { | ||
... on ProjectV2Field { | ||
id | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters