Skip to content

Commit

Permalink
Use the correct body for GraphQL requests (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
loganswartz authored Nov 23, 2024
1 parent 1c4156b commit 89e713b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/kulala/parser/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 89e713b

Please sign in to comment.