branch: elpa/graphql-mode
commit ebd6502c0901dd2864a6ac893659a0cd74b6ba73
Merge: 6f6b303af4 c643d53a4b
Author: David Vázquez Púa <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #25 from Malabarba/operation-bug
Don't send operationName when operation is an empty string
---
graphql-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/graphql-mode.el b/graphql-mode.el
index 5e800ad5b8..f39aa4d5ce 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -77,7 +77,7 @@
"Put together a json like object with QUERY, OPERATION, and VARIABLES."
(let* ((body '()))
(push (cons 'query query) body)
- (when operation
+ (when (and operation (not (string= operation "")))
(push (cons 'operationName operation) body))
(when variables
(push (cons 'variables variables) body))