Skip to content

Instantly share code, notes, and snippets.

View verystack's full-sized avatar
🎯
Focusing

verystack

🎯
Focusing
View GitHub Profile
// Here's what I'm implementing typewise to stop dynamically defined stuff throwing errors on MatchKicks
// The important things about the syntax are:
// The type that implements Node (ParsedSneaker here) needs to be the same as your Gatsby type itself.
// You don't need to define things that aren't necessary - for ParsedSneaker, there is way more fields than just sneakerSettings
// - but that's the only one that is potentially missing data
// Syntax:
// Every JSON object needs a type for strict validation
// You create the type and then add it to your existing type - like on ParsedSneaker,
// I implement a type called SneakerSettings on the sneakerSettings key