Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 4

GET /event equivalent for v4?

Solved! Go to Solution.

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?

3 Replies
Solution
Community Manager
Message 2 of 4

Re: GET /event equivalent for v4?

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

Thanks for being here, sharing, and keeping our community awesome!
Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Highlighted
Copilot Lvl 2
Message 3 of 4

Re: GET /event equivalent for v4?

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

 

query {
  organization(login:"github") {
    IssueTimelineItems(first:20) {
      edges {
        node {
          id
          title
          url
        }
      }
    }
  }
}

How does on form IssueTimelineItems within a call?

Copilot Lvl 3
Message 4 of 4

Re: GET /event equivalent for v4?

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.