GraphQL will return 0 nodes on a search query w/ PAT #149046
Replies: 2 comments
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
Ah! Thank you for posting this! I've spent hours today trying to figure out why my search query wasn't working, and it's because of this bug. To reproduce:
Especially confusing is I was trying to debug by sending queries through https://github.com/search , ex: https://github.com/search?q=is%3Aopen&type=issues , and those always worked! |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
So it seems there was a recent change regarding searching with a PAT, where we have to split out into 2 requests to get both issues and PRs (Why?). However, I only found this behavior and it's accompanying note on the REST API's documentation page. Below follow the queries used to replicate this issue, and its responses.
Query:
Variables:
Response:
Adding in either
is:issue
, oris:pull-request
to the query variable will give the expected search results, as seen below:Fixed response:
So long story short. This isn't documented in the schema anywhere, nor does this give an error within the
error
field And its assumed that the user just seems to know about it. Leading to a confusing situation where the user doesn't know that this limitation is in place since it doesn't error out like the REST API does, where it'll give a HTTP 422.Beta Was this translation helpful? Give feedback.
All reactions