MenuQueries LibraryFetch repositories from GitHubFetch repositories from GitHubThis query connects to GitHub's GraphQL API and retrieves the list of repos for the indicated owner. query FetchGitHubRepositories( $login: String! $numberRepos: Int! = 100 ) { githubAccessToken: _env(name: "GITHUB_ACCESS_TOKEN") @remove _sendGraphQLHTTPRequest(input:{ endpoint: "https://api.github.com/graphql", query: """ query GetRepositoriesByOwner($login: String!, $numberRepos: Int!) { repositoryOwner(login: $login) { repositories(first: $numberRepos) { nodes { id name description } } } } """, variables: [ { name: "login", value: $login }, { name: "numberRepos", value: $numberRepos } ], options: { auth: { password: $__githubAccessToken } } }) }Copy And define in wp-config.php: define( 'GITHUB_ACCESS_TOKEN', '{ your github access token }' );CopyPrevFetch US weather forecast data for multiple locationsNextFetch user data from Mailchimp list
This query connects to GitHub's GraphQL API and retrieves the list of repos for the indicated owner. query FetchGitHubRepositories( $login: String! $numberRepos: Int! = 100 ) { githubAccessToken: _env(name: "GITHUB_ACCESS_TOKEN") @remove _sendGraphQLHTTPRequest(input:{ endpoint: "https://api.github.com/graphql", query: """ query GetRepositoriesByOwner($login: String!, $numberRepos: Int!) { repositoryOwner(login: $login) { repositories(first: $numberRepos) { nodes { id name description } } } } """, variables: [ { name: "login", value: $login }, { name: "numberRepos", value: $numberRepos } ], options: { auth: { password: $__githubAccessToken } } }) }Copy And define in wp-config.php: define( 'GITHUB_ACCESS_TOKEN', '{ your github access token }' );Copy