#GraphQL + GraphCMS Assistance

6 messages · Page 1 of 1 (latest)

ancient palm
#

This is what my GraphCMS Schema looks like too. It's a deviation from the structure in the video, using a single Schema instead of several.

rustic junco
#

If you console log posts in the component, does anything show?

ancient palm
rustic junco
#

!!js.undefined

worthy oxideBOT
#
Are you getting an error that looks like this?
💠💠💠

Uncaught TypeError: Cannot read properties of undefined (reading 'name') (or a very similar message)

This means you have tried to access a property on a value that is undefined. A value could be undefined (or null) for many reasons.

// Using a variable without declaring it:
foo.name;

// Declaring a variable, but not setting a value:
let foo;
foo.name;

// Declaring a variable, but setting it to undefined explicitly...
// or returning undefined from a function or method:
let foo = undefined;
foo.name

You'll have to find the variable on which you try to access the property, and work backwards to find out why it's undefined (or null). Errors come with stack traces right underneath. It will say the exact line and position where the error occurred.

rustic junco