likyh commented on issue #1433: URL: https://github.com/apache/incubator-devlake/issues/1433#issuecomment-1210431789
Jira: Add header: `Authorization: Basic XXXXXX`. Then use this query to request all projects. Don't use Jira graphql client. use `https://graphiql-online.com/graphiql`. ``` query example { jira { allJiraProjects(cloudId: "b696e399-4a1d-4ef6-a6e8-d4243f3b59f6", filter: {sortBy: {sortBy: NAME, order: ASC}}, first: 1) { pageInfo { hasNextPage endCursor } edges { node { key name opsgenieTeamsAvailableToLinkWith { pageInfo { hasNextPage } edges { node { id name } } } } } } } } ``` got project id: `ari:cloud:jira:b696e399-4a1d-4ef6-a6e8-d4243f3b59f6:project/10029` request issue detail: ``` query example { jira { issueByKey(cloudId: "b696e399-4a1d-4ef6-a6e8-d4243f3b59f6", key: "EE-1111") { id issueId key worklogs { pageInfo { endCursor hasNextPage } edges { node { created author { name } id worklogId updated startDate updateAuthor { name } } } } webUrl } } } ``` request issue list: ``` query example { jira { issueSearchStable(cloudId: "b696e399-4a1d-4ef6-a6e8-d4243f3b59f6", issueSearchInput: {jql: "project=EE and key='EE-1111'"}) { pageInfo { hasNextPage endCursor } totalCount edges { node { id key webUrl worklogs { edges { node { id startDate } } } } } } } } ``` Seems it can just request workLogs but cannot request changeLogs. Jira's graphql now requests at most 100 per page which same as restful. So graphql only improve the query loop. Now only account/changeLog/workLog/remoteLink use the query loop. ChangeLog and remoteLink need massive requests but cannot query in graphql. WorkLog and account can query in graphql but they use limited requests. So it's mostly useless to use graphql in jira. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
