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

GraphQL to get a project by name and its associated issues

This is my first time using GraphQL. I'm able to get a project by name 

query {
  repository(owner:"owner", name:"name") {
    projects(search:"Test Project", first:5) {
      edges {
        node {
          name
          bodyHTML
        }
      }
    }
  }
}

How can I get the issues that are associated with that project? Is it possible to start with the project? Or would I have to start with the issues and get the projects via ProjectCards?

 

Thanks for any help!

1 Reply
Highlighted
Community Manager
Message 2 of 2

Re: GraphQL to get a project by name and its associated issues

I believe you have to go from project to columns to cards to the card's `content` field, which links to either an Issue or a Pull Request. I don't think that there's a direct route from project to all cards in the project. There is the `pendingCards` connection but I think that's cards that don't belong to a column yet.

 

I hope that helps! Let me know if you have any questions.