From fe96029e3aeb85812e6d631ae7777db83c84aafb Mon Sep 17 00:00:00 2001
From: Michael Macias <zaeleus@gmail.com>
Date: Sat, 14 Jan 2017 14:56:55 -0600
Subject: [PATCH] Fix graphQLFetcher body serialization

`params.variables` is already an object when passed to the fetcher and
does not need to be parsed.
---
 src/integrations/iron_handlers.rs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/integrations/iron_handlers.rs b/src/integrations/iron_handlers.rs
index 78607bdd..efbc2311 100644
--- a/src/integrations/iron_handlers.rs
+++ b/src/integrations/iron_handlers.rs
@@ -189,10 +189,7 @@ impl Handler for GraphiQLHandler {
                         'Accept': 'application/json',
                         'Content-Type': 'application/json',
                     },
-                    body: JSON.stringify({
-                        query: params.query,
-                        variables: JSON.parse(params.variables || '{}')
-                    }),
+                    body: JSON.stringify(params)
                 }).then(function (response) {
                     return response.text();
                 }).then(function (body) {