Support lowdb json format
yarn add gatsby-transformer-lowdb
// In your gatsby-config.js
plugins: [
`gatsby-transformer-lowdb`,
]
If your project has a db.json
with
{
"letters": [
{ value: 'a' },
{ value: 'b' },
{ value: 'c' },
]
]
You'd be able to query your letters like:
{
allLetters {
edges {
node {
value
}
}
}
}
Which would return:
{
allLetters: {
edges: [
{
node: {
value: 'a'
}
},
{
node: {
value: 'b'
}
},
{
node: {
value: 'c'
}
}
]
}
}