Skip to content

🩹 [Patch]: Convert some of the org functions to GraphQL #454

@MariusStorhaug

Description

@MariusStorhaug

Describe the change

Describe the change

The current implementation of getting a list of organizations, does not fetch the html url of the organizations. Altho this could be mocked (based on the API host + '/' + orgname, we want to change this to:

$query = '
query {
    viewer {
        organizations(first: 100) {
            nodes {
                id
                databaseId
                login
                url
                name
                createdAt
                updatedAt
            }
            pageInfo {
                hasNextPage
                endCursor
            }
        }
    }
}
'

$results = Invoke-GitHubGraphQLQuery -Query $query
$results.viewer.organizations.nodes | Select name, login, url, createdAt, updatedAt | Format-Table -AutoSize
name               login              url                                   createdAt           updatedAt
----               -----              ---                                   ---------           ---------
AzActions          AzActions          https://github.com/AzActions          16.06.2021 01:08:02 22.06.2025 18:41:00
MSX                MSXOrg             https://github.com/MSXOrg             24.11.2021 10:34:26 22.06.2025 18:41:00
PSModule           PSModule           https://github.com/PSModule           23.08.2023 00:13:21 22.06.2025 18:41:00
psmodule-test-org  psmodule-test-org  https://github.com/psmodule-test-org  23.12.2024 14:14:52 28.06.2025 00:23:10
psmodule-test-org2 psmodule-test-org2 https://github.com/psmodule-test-org2 27.12.2024 10:40:48 28.06.2025 00:22:27
psmodule-test-org3 psmodule-test-org3 https://github.com/psmodule-test-org3 27.12.2024 18:59:32 28.06.2025 00:23:39
limit-test         limit-test         https://github.com/limit-test         25.05.2025 15:32:42 22.06.2025 18:41:00
psmodule-test      psmodule-test      https://github.com/psmodule-test      29.05.2025 18:16:29 29.05.2025 18:16:29

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions