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.
npm install --save gatsby-transformer-estates
// 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
// },
}
]
You can query npm nodes like the following
allEstatesSanitized {
allIs24EstatesSanitized {
edges {
node {
id
title
}
}
}
}
singleEstateSanitized {
is24EstatesSanitized(id: { eq: "123456" }) {
id
title
}
}
- write tests
- Roll out for other types