How to programmatically create request body before sending requests? #433
-
I want to create GraphQL query programmatically before sending the request. Couldn't find a way to set the request body. ## Dynamic query
# @lang lua
< {%
-- read the query or mutation from a file
-- create a JSON object with that query and variables.
-- set the JSON object as the body
%}
POST http://localhost:8000/graphql
Content-Type: application/json |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Sorry for late reply. I constantly forgot about discussions tab. I should find way to subscribe this. I’m not sure if intellij or vscode plugins support writing body from pre-request scripts.
I didn’t include graqphql support from v3 release due to lack of my knowledge about them. |
Beta Was this translation helpful? Give feedback.
Sorry for late reply. I constantly forgot about discussions tab. I should find way to subscribe this.
I’m not sure if intellij or vscode plugins support writing body from pre-request scripts.
One possible workout would be using variables like this: