gatsby-transformer-estates

1.2.0 • Public • Published

gatsby-transformer-estates

Build Status npm Code Style semantic-release

This plugin transforms the estates that where fetched by the gatsby-source-is24 plugin. The properties are normalized and reduced to the keys in the config file. The fields and maxDimensions of the attachments can additionally be specified as options.

Install

npm install --save gatsby-transformer-estates

How to use

// In your gatsby-config.js
 
// without options
`gatsby-transformer-estates`
 
// OR
 
// with options
plugins: [
  resolve: `gatsby-transformer-estates`,
  options: {
    // optional option properties
    // fields = [default_fields], // The whitelisted fields to be kept in sanitized data
    // maxDimensions = { // the max dimensions the image urls should be scaled to
    //   height: 3000,
    //   width: 3000
    // },
  }
]

How to query

You can query npm nodes like the following

allEstatesSanitized {
  allIs24EstatesSanitized {
    edges {
      node {
        id
        title
      }
    }
  }
}
 
singleEstateSanitized {
  is24EstatesSanitized(id: { eq: "123456" }) {
    id
    title
  }
}

TODO

  • write tests
  • Roll out for other types

Package Sidebar

Install

npm i gatsby-transformer-estates

Weekly Downloads

3

Version

1.2.0

License

MIT

Unpacked Size

22.4 kB

Total Files

12

Last publish

Collaborators

  • jroehl