Skip to content

Commit fe96029

Browse files
committed
Fix graphQLFetcher body serialization
`params.variables` is already an object when passed to the fetcher and does not need to be parsed.
1 parent 8620eb1 commit fe96029

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/integrations/iron_handlers.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,7 @@ impl Handler for GraphiQLHandler {
189189
'Accept': 'application/json',
190190
'Content-Type': 'application/json',
191191
},
192-
body: JSON.stringify({
193-
query: params.query,
194-
variables: JSON.parse(params.variables || '{}')
195-
}),
192+
body: JSON.stringify(params)
196193
}).then(function (response) {
197194
return response.text();
198195
}).then(function (body) {

0 commit comments

Comments
 (0)