This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
GitHub API
Ashwin Shenoy edited this page Dec 30, 2018
·
2 revisions
GitHub v4 GraphQL is a shift from the traditional v3 REST API structure of GitHub, as it is a specification which offers an elegant way of data retrieval, offers more efficient queries and more stablitiy to the backend.
It offers a much easier and comfortable way to understand, write and send queries and that is the reason why almost all the queries used here will be in GraphQL. Although some specific data is not available via GraphQL, REST v3 API is used wherever v4 failed.
- To extract the topic names assigned for a given input repository
query
{
repository(owner:"amfoss", name:"fosswebsite")
{
repositoryTopics
{
nodes
{
topic
{
name
}
}
}
}
}
This query returns a list of topic names in JSON format.
One may use the GitHub v4 Explorer to test constructing and sending queries.
GitLit by amFOSS