`yarn redwood check` errors with "Cannot read properties of undefined (reading 'getStart')"

Hello all!

When I run a yarn redwood check I get errors for:

Cannot read properties of undefined (reading ‘getStart’)

It only happens in Cells where I pass an existing query from another Cell to it, for example:

import { QUERY as ProductQuery } from 'src/components/Product/ProductCell'

export const QUERY = ProductQuery

Will produce the error:

web/src/components/Product/ProductCardCell/ProductCardCell.tsx:10:14: error: Cannot read properties of undefined (reading ‘getStart’)

Should I be writing this a different way? Maybe rewrapping in a gql call?

Query reuse is often best implemented using fragments.

Have a look at Fragments | RedwoodJS Docs and see if that can help you organized your data fetching and rendering while reusing part of queries.

1 Like