gatsby-transformer-lowdb

0.0.7 • Public • Published

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'
        }
      }
    ]
  }
}

/gatsby-transformer-lowdb/

    Package Sidebar

    Install

    npm i gatsby-transformer-lowdb

    Weekly Downloads

    0

    Version

    0.0.7

    License

    MIT

    Last publish

    Collaborators

    • gutenye