Testing GraphQL using RSpec

In this video, I show how to test GraphQL mutations and queries using RSpec and how-to extract queries using variables and reuse them across your tests. Chapters: 0:00 Intro 0:32 Using Fixtures with RSpec 1:12 Testing Login mutation 4:30 DRY up your tests 6:23 Testing Register mutation 11:53 Testing Me query 15:54 Wrapping up All of the code for this tutorial is available on GitHub: - If you want to follow along you’ll find the project at the beginning of the video on this branch: https://github.com/phawk/coinfusion/tree/testing_graphql_1 - And the completed graphql example is here: https://github.com/phawk/coinfusion/tree/testing_graphql_2 --- Has this video helped you out? Consider buying me a coffee to say thanks and support future content like this, thanks! https://app.payhere.co/rapid-ruby/buy-me-a-coffee-aa4618e4-45d1-4727-81b9-2d081449d61d You can also find more content like this, including premium courses and exclusive community and mentorship to help you level-up! Head over to https://rapidruby.com and use the code RRYOUTUBE for a discount!


Published: Apr 29, 2022

View my video on YouTube