GraphQL v4 PullRequest approved?

I have a PullRequest. I want to know if it is approved or not (as per the “Approved” text that shows up on the GitHub web UI). How do I compute this? It doesn’t seem to be a field on the PullRequest object.

A pull request is approved when there is one or more reviews with an APPROVED state. So you would use the reviews connection, filter by APPROVED, and check if the totalCount is greater than 0.