[ gatsby-transformer-json ] queries

gatsby-config.json

‘gatsby-transformer-json’,
{
resolve: ‘gatsby-source-filesystem’,
options: {
path: ‘./export/entries.json’,
},
},

./export/entries.json

[
{
“sys”: {

“id”: “3K9b0esdy0q0yGqgW2g6Ke”,

}

}

]

pong NOTE : the file name should end with Json.

graphql query

{
allEntriesJson {
edges {
node {
sys {
id
}
}
}
}
}

ref : https://www.gatsbyjs.org/packages/gatsby-transformer-json

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s