Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

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
© 2023 Gatsby, Inc.