From 8815281682f21ac38fbafa89d8f7ba656c8b90ae Mon Sep 17 00:00:00 2001 From: Logan Swartzendruber Date: Thu, 21 Nov 2024 17:31:05 -0500 Subject: [PATCH] Use the correct body for GraphQL requests --- lua/kulala/parser/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/kulala/parser/init.lua b/lua/kulala/parser/init.lua index cdf2c4c..885397f 100644 --- a/lua/kulala/parser/init.lua +++ b/lua/kulala/parser/init.lua @@ -689,7 +689,7 @@ M.parse = function(start_request_linenr) local gql_json = GRAPHQL_PARSER.get_json(res.body) if gql_json then if PARSER_UTILS.contains_meta_tag(res, "write-body-to-temporary-file") then - local tmp_file = FS.get_temp_file(res.body) + local tmp_file = FS.get_temp_file(gql_json) if tmp_file ~= nil then table.insert(res.cmd, "--data") table.insert(res.cmd, "@" .. tmp_file) @@ -730,7 +730,7 @@ M.parse = function(start_request_linenr) if is_graphql then local gql_json = GRAPHQL_PARSER.get_json(res.body) if gql_json then - local tmp_file = FS.get_temp_file(res.body) + local tmp_file = FS.get_temp_file(gql_json) if tmp_file ~= nil then table.insert(res.cmd, "--data") table.insert(res.cmd, "@" .. tmp_file)