GET /event equivalent for v4? #24817
-
So, I’m trying to switch my small project from REST to GraphQL. Looks nice to fetch exactly what’s needed. But what I’m mostly fetching from REST are events from v3 but i can’t find it on the v4-docs. Is there any equivalent to events on GraphQL? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Hi @serkan-devel, Thank you for being here! In GraphQL there is an issue timeline connection, which looks like it should work for you. https://developer.github.com/v4/union/issuetimelineitem/ I hope this helps! Andrea |
Beta Was this translation helpful? Give feedback.
-
Thank you for the answer. I just succeeded with a working prototype of the app in REST just recently, but using graphql would probably make the code shorter, going through less parsing steps. But for some reason, I can’t form calls, like this one
How does on form IssueTimelineItems within a call? |
Beta Was this translation helpful? Give feedback.
-
IssueTimeline is not a replacement for the /events v3 API because it seems to be per issue only. For example, I need all events from the repository, from all issues, all pull requests, branches created, starred events, etc. Just like the api v3 works. Also user received_events, organization events, notifications, etc. Is that planned? I believe this should not be marked as solved. |
Beta Was this translation helpful? Give feedback.
-
We’re in the same spot, trying to port over an application that uses the /events of the V3 API. An equivalent stream would be awesome in the GraphQL API |
Beta Was this translation helpful? Give feedback.
-
For example, today in the GitHub Universe GraphQL workshop by @krider2010, the exercises included
GraphQL currently doesn’t support a way to query CreateRepo event for answering that question. That is one use case where one has to fallback to the RESTful API (i.e., /users/:username/events endpoint). As an aside, per the v3 API documentation, you wouldn’t be able to access your first CreateRepo event for your very first repository unless your first ever repository was contained in your last 300 events / within the 90 days period. |
Beta Was this translation helpful? Give feedback.
-
I’m in the same spot, trying to query push and release events specifically, but the issue timeline connection seems far too limited for most use cases. |
Beta Was this translation helpful? Give feedback.
Hi @serkan-devel,
Thank you for being here! In GraphQL there is an issue timeline connection, which looks like it should work for you. https://developer.github.com/v4/union/issuetimelineitem/
I hope this helps!
Andrea