Function: ghub--graphql-handle-response
ghub--graphql-handle-response is a byte-compiled function defined in
ghub-graphql.el.
Signature
(ghub--graphql-handle-response STATUS REQ)
Source Code
;; Defined in ~/.emacs.d/elpa/ghub-20260401.1239/ghub-graphql.el
(defun ghub--graphql-handle-response (status req)
(let ((buf (current-buffer)))
(unwind-protect
(progn
(set-buffer-multibyte t)
(let* ((headers (ghub--handle-response-headers status req))
(payload (ghub--handle-response-payload req))
(data (assq 'data payload))
(err (plist-get status :error))
(errors (and (not (and (ghub--req-noerror req)
(assq 'data payload)))
(assq 'errors payload))))
(cond ((or err errors)
(when (and (not err) ghub-debug)
(ignore-errors (json-pretty-print (point) (point-max)))
(pop-to-buffer buf))
(if (ghub--req-noerror req)
(ghub--graphql-walk-response req data)
(ghub--graphql-handle-failure
req (or err errors) headers status)))
((ghub--graphql-walk-response req data)))))
(when (and (buffer-live-p buf)
(not (buffer-local-value 'ghub-debug buf)))
(kill-buffer buf)))))