branch: elpa/graphql-mode
commit 404aa312581bf7d2a2a59fc41d70dff3dd7de98a
Author: Aleksandar Dimitrov <[email protected]>
Commit: Aleksandar Dimitrov <[email protected]>

    Save json to graphql-edit-headers
---
 graphql-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/graphql-mode.el b/graphql-mode.el
index 93490a589f..08f1e73a85 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -421,8 +421,8 @@ when sending a request."
   "Accept buffer contents and write to `graphql-extra-headers'."
   (interactive)
   (unless (graphql-edit-headers-buffer-p) (error "Not in a GraphQL headers 
buffer"))
-  (message "TODO: save to graphql-extra-headers")
-  (graphql-edit-buffers--kill-pop-up-buffer))
+  (setq graphql-extra-headers (json-read-from-string (buffer-string)))
+  (graphql-edit-headers--kill-pop-up-buffer))
 
 (defun graphql-edit-headers-abort ()
   "Kill current headers buffer and return to graphql file."

Reply via email to