I came across an interesting behavior with Cells and Storybook.
If I have a Cell that loads some data with a nested query (Example: Post table with a field relation to a subPost table), and I create some mock data that does not contain the subPosts field, then the Cell component will still load properly in Storybook. If I take that same cell and mock data and add it to a page component though, then Storybook will throw an error on the page component (Cannot render cell: graphQL success but
data is null)
I’m not sure if this is a potential bug or expected behavior but I wanted to point it out just in case.
Here’s a test project I put together in case anyone wants to test it out.
Here’s the cell mock that causes the Storybook error on the page component, but works on the cell component: