GraphQL API does not respect a user in the head ref argument for pull requests query

schema-request

#1

The REST API allows filtering out pull request based on the head ref of user:ref-name form. It does not seem to be possible with GraphQL API. The head ref always has ref-name form. How can one achieve the same with GraphQL API?


#2

Hi @akosyakov, I believe that at this time, it is only possible to filter pull requests in the GraphQL on the ref-name head ref name, not including the user.

Can you achieve your goals with just ref-name? It would help to understand what your use-case is.


#3

Hi @rlinehan, thank you for clarifications.
I want to find a PR for a user and a head ref. Unfortunately, I can do it only by fetching all PRs for a head ref and then filtering result out based on a repository owner. I went with the REST API for now.


#4

Thanks @akosyako, that information is helpful. I’ve gone ahead and opened an internal issue for this; we’ll report back here when we’ve got any updates.