Hi! I’m trying to do something similar to the Github timeline view on Github’s front page.

In the context of a user, I want to fetch all commits in createdAt desc order.

How can I query for that?

I’ve come up with this query, which very roughly works, but it’s hacky – rather than search for all commits, it grabs the most recent ‘n’ commits from every repository, so it will have gaps for branches that have lots of commits. It also hits a limit and starts returning empty nodes if I crank up the numbers of objects requested to something more realistic in order to capture all activity.

Is there a more direct way of searching for all commits visible to a given user?

Hm, not that I can think of off of the top of my head. One improvement to your current query may be using the recently added visibility argument to the repositories connection. Something along the lines of:

Which will return all of the commits of all the repositories that defunkt has any affiliation with, and that the currently authenticated user can also see.

Since this isn’t quite what you’re looking for (I can imagine the deep pagination would make this very difficult to work with), I’d suggest creating a new issue, outlining your intended use case and tagging it as a schema request as described in:

Hi All!
We had previously asked for schema requests here in a single thread.
Over time and quite predictably, that's become harder to manage. Additionally, more complex discussions about schema requests or existing schema were often lost or difficult to follow in the larger thread.
As a result, we're changing how we'd like to receive this type of feedback from the community to make sure we don't miss anything. Going forward, just create a new topic for your schema request and tag your ne…

That way we may be able to provide a more adequate field or connection in the schema for what you’re looking to do.