I am writing tests in postman and i am having GQL POST request, in which i need to extract the GQL variables in test to validate and write script. But i cant able to extract the GQL variables. Is there any methods available to extract GQL variables like we have in json, var req = JSON.parse(pm.request.body.raw);.
Asked
Active
Viewed 376 times
1
-
What do you get when you `console.log(pm.request.body)` it should show the details of the payload, if it's graphql, that will be there. – Danny Dainton Jan 23 '22 at 22:42
-
Yup, I can able to get the request payload now. Can you please suggest any methods or library to extract the GQL variables in test? – santhosh selvam Jan 24 '22 at 08:30