redwoodjs/learn.redwoodjs.com

Improve clarity and provide example of mocking GraphQL requests in Storybook

realStandal opened this issue · 2 comments

I was helping @Kritsatorn (who speaks Thai - just an fyi :) ), who ran into trouble mocking GraphQL requests from Storybook in the tutorial app while he was following part 2. (His issue was caused by something only slightly related, but I believe what I'm about to describe is still outstanding).

Specifically, he noted a particular blob of text which gave him trouble:

image

It explains that a cell should be mocked but doesn't provide an explanation as to how the request can be mocked.

Also, the wording is a bit... weird. I think the clarity of the description can be improved - particularly to help our non-English speaking friends around the globe, when translations in their native language are lacking.

This callout (along with everything else) is being updated for the upcoming v1.0 release of Redwood.

But, there are no instructions here because there's nothing to do! If you followed along with the tutorial, you already mocked out the CommentsCell data (in a function called standard() in CommentsCell.mock.js). But at this point we're viewing a Page (that contains a Cell), and just noting that you're still seeing the mocked data automatically.

@cannikin Maybe it's because I'm on Windows, but I've never been able to just let mocking work and this note is the only sentence I've ever seen about mocking being "automatic". I've always had to mockGraphQL*