Rayrun
← Back to Discord Forum

waitForApiResonse for graphql

ravikiran0186posted in #help-playwright
Open in Discord
ravikiran0186
ravikiran0186

How to use wait for response using the request body? We can check for the request body as a string and use include. How to use JSON.parse() and pass the body inside and check for a key equals

The body is not getting resolved and throwing an error. How to use await for request body as JSON?

#waitForResponse

This thread is trying to answer question "How to use 'waitForResponse' with a request body as JSON in GraphQL?"

1 reply
tarpitcarnivore
tarpitcarnivore

You don't need a whole library to just wait:

You may have better luck with waitforrequest than response b/c you can more directly access the postDataJSON which should have graphql query/mutation name in it

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].