Github GraphQL – list projects whish have at least one branch

In my app I am listing projects with GitHub GraphQL.
I process their branches so I want to ignore projects which don’t have any branch. I am not sure how to do that.

Currently I have the following query:

{"query":"{
            search(query: \" user:vhorvath001 \", type: REPOSITORY, first: 100) {
                repositoryCount
                edges {
                    node {
                        ... on Repository {
                            owner {
                                login
                            }
                            name
                            url
                            refs(query: \"\", refPrefix: \"refs/heads/\", first: 50, ) {
                                pageInfo {
                                    endCursor
                                    hasNextPage
                                }              
                                nodes {
                                    name
                                }
                            }
                        }
                    }
                }
            }
        }"}

Is there a way to add a filter part to enlist projects which have at least branch?

Thanks a lot!

Read more here: Source link