rans>Skip to main content
Community Plugin
View plugin on GitHub
See starters using this

gatsby-transformer-lowdb

Support lowdb json format

Install

yarn add gatsby-transformer-lowdb

How to use

// In your gatsby-config.js
plugins: [
  `gatsby-transformer-lowdb`,
]

How to store

If your project has a db.json with

{
  "letters": [
    { value: 'a' },
    { value: 'b' },
    { value: 'c' },
  ]
]

How to query

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'
        }
      }
    ]
  }
}
Docs
Tutorials
Plugins
Blog
Showcase