Hello,
If in my application I run multiple promises together using Promise.all, how can I replicate that with k6?
I didn’t see anything mentioned about that in the docs/github.
Basically our homepage prepares 4 graphql requests as promises, then we use Promise.all to run them in parallel.
How can I replicate this with k6 to get more accurate results?
Nevermind, managed to find out how. If the blog article enable users to submit changes from the website(like Prisma docs), then I would happily submit a PR explaining how I solved it so other people won’t fall into the same issue.
I don’t think our blogs allow edits, but the docs site itself does.
I could ask the blog writer to modify their post, but I do note that the basic example linked toward the bottom of the post does contain a parameterized “mutation” query:
Well both the query and mutation are doing basically the same thing; substituting values in the query string, which is nice in custom resolvers that only have flat fields.
That’s basically it. But there’s one thing that was weird, the spread operator doesn’t work at the http.post line, although this is a javascript file. It says unexpected token, like this example: