February 28, 2019 • ☕️ 1 min read
Integration testing in the context of GraphQL means testing your server’s ability to call the resolvers to fetch the data.
Typically you’d already have individual unit tests for the logic within your resolvers, and you just want to test whether or not your server actually sends the data the way you expect it to.
First off, you’re going to need a GraphQL server.
You’ll then need to write a helper function that runs GraphQL queries against your server’s address.
For each test, the function will need to:
For each test on subsequent runs, the function will need to:
Enjoyed this post? Receive the next one in your inbox!