File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -35,26 +35,26 @@ const GET_REPOSITORY_OF_ORGANIZATION = `
35
35
` ;
36
36
37
37
const GET_ISSUES_OF_REPOSITORY = `
38
- {
39
- organization(login: "the-road-to-learn-react") {
40
- name
41
- url
42
- repository(name: "the-road-to-learn-react") {
38
+ query($organization: String!, $repository: String!) {
39
+ organization(login: $organization) {
43
40
name
44
41
url
45
- issues( last: 5 ) {
46
- edges {
47
- node {
48
- id
49
- title
50
- url
42
+ repository(name: $repository) {
43
+ name
44
+ url
45
+ issues( last: 5 ) {
46
+ edges {
47
+ node {
48
+ id
49
+ title
50
+ url
51
+ }
51
52
}
52
53
}
53
54
}
54
55
}
55
56
}
56
- }
57
- ` ;
57
+ ` ;
58
58
59
59
const getIssuesOfRepositoryQuery = ( organization , repository ) => `{
60
60
organization( login: "${ organization } ") {
@@ -80,7 +80,8 @@ const getIssuesOfRepository = path => {
80
80
const [ organization , repository ] = path . split ( '/' ) ;
81
81
82
82
return axiosGithubGraphQL . post ( '' , {
83
- query : getIssuesOfRepositoryQuery ( organization , repository ) ,
83
+ query : GET_ISSUES_OF_REPOSITORY ,
84
+ variables : { organization, repository } ,
84
85
} ) ;
85
86
} ;
86
87
You can’t perform that action at this time.
0 commit comments