Dynamically construct the GraphQL query by using the `viewer` connection if the owner isn't set and the `repositoryOwner(login:"...")` connection if the owner was set.
40 lines
1,017 B
JSON
40 lines
1,017 B
JSON
{
|
|
"data": {
|
|
"repositoryOwner": {
|
|
"login": "octocat",
|
|
"repositories": {
|
|
"totalCount": 3,
|
|
"nodes": [
|
|
{
|
|
"nameWithOwner": "octocat/hello-world",
|
|
"description": "My first repository",
|
|
"isFork": false,
|
|
"isPrivate": false,
|
|
"isArchived": false,
|
|
"pushedAt": "2021-02-19T06:34:58Z"
|
|
},
|
|
{
|
|
"nameWithOwner": "octocat/cli",
|
|
"description": "GitHub CLI",
|
|
"isFork": true,
|
|
"isPrivate": false,
|
|
"isArchived": false,
|
|
"pushedAt": "2021-02-19T06:06:06Z"
|
|
},
|
|
{
|
|
"nameWithOwner": "octocat/testing",
|
|
"description": null,
|
|
"isFork": false,
|
|
"isPrivate": true,
|
|
"isArchived": false,
|
|
"pushedAt": "2021-02-11T22:32:05Z"
|
|
}
|
|
],
|
|
"pageInfo": {
|
|
"hasNextPage": false,
|
|
"endCursor": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|