Рет қаралды 1,847
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:
github.com/phawk/coinfusion/t...
- And the completed graphql example is here:
github.com/phawk/coinfusion/t...
---
Has this video helped you out? Consider buying me a coffee to say thanks and support future content like this, thanks!
app.payhere.co/rapid-ruby/buy...
You can also find more content like this, including premium courses and exclusive community and mentorship to help you level-up! Head over to rapidruby.com and use the code RRKZbin for a discount!