Ecosystem

Design

Node Interface

The “node” is the center of Gatsby’s data system. All data that’s added to
Gatsby is modeled using nodes.

The basic node data structure is as follows:

id:String,
children: Array[String],
parent:String,// Reserved for plugins who wish to extend other nodes.
fields: Object,
internal:{
contentDigest:String,// Optional media type (https://en.wikipedia.org/wiki/Media_type) to indicate// to transformer plugins this node has data they can further process.
mediaType:String,// A globally unique node type chosen by the plugin owner.type:String,// The plugin which created this node.
owner:String,// Stores which plugins created which fields.
fieldOwners: Object,// Optional field exposing the raw content for this node// that transformer plugins can take and further process.
content:String,}...other fields specific to thistypeof node

Source plugins

New nodes are added to Gatsby by “source” plugins. A common one that many Gatsby
sites use is the Filesystem source plugin
which turns files on disk into File nodes.