I just tried this to detect new release of some repository but it didn't work. I noticed that the query
var query struct {
Repository struct {
ID githubql.ID
Name githubql.String
Description githubql.String
URL githubql.URI
Releases struct {
Edges []struct {
Node struct {
ID githubql.ID
Name githubql.String
Description githubql.String
URL githubql.URI
PublishedAt githubql.DateTime
}
}
} `graphql:"releases(last: 1)"`
} `graphql:"repository(owner: $owner, name: $name)"`
}
always gets the oldest release.
If I changed the query to graphql:"releases(first: 1)" it will get the newest release and everything goes well.
Maybe github inverted the sort direction of graphql api recently?
I just tried this to detect new release of some repository but it didn't work. I noticed that the query
always gets the oldest release.
If I changed the query to
graphql:"releases(first: 1)"it will get the newest release and everything goes well.Maybe github inverted the sort direction of graphql api recently?